Skip to content

Commit

Permalink
Use tagpr
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Oct 25, 2022
1 parent 08cd976 commit efe0c6e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 124 deletions.
51 changes: 44 additions & 7 deletions .github/workflows/release.yml → .github/workflows/tagpr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,50 @@
name: release

name: tagpr
on:
workflow_dispatch:
push:
tags:
- v*.*.*
branches:
- main

jobs:
tagpr:
runs-on: ubuntu-latest
outputs:
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@v3

- id: run-tagpr
name: Run tagpr
uses: Songmu/tagpr@v1

darwin-release:
needs: tagpr
if: needs.tagpr.outputs.tagpr-tag != ''
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup
run: |
brew uninstall [email protected]
brew install go
brew install goreleaser
brew install sqlite3
- name: Release
run: |
make release_darwin
linux-release:
name: Release assets for Linux
needs: tagpr
if: needs.tagpr.outputs.tagpr-tag != ''
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
Expand Down Expand Up @@ -69,7 +105,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

windows-release:
name: Release assets for Windows
needs: tagpr
if: needs.tagpr.outputs.tagpr-tag != ''
runs-on: windows-2019
steps:
- name: Use LF
Expand Down
108 changes: 0 additions & 108 deletions .goreleaser.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .goreleaser/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ archives:
-
id: tbls-archive
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
format_overrides:
- goos: windows
format: zip
- goos: darwin
format: zip
files:
- CREDITS
- README.md
Expand Down
2 changes: 0 additions & 2 deletions .goreleaser/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ archives:
format_overrides:
- goos: windows
format: zip
- goos: darwin
format: zip
files:
- CREDITS
- README.md
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ prerelease:
git commit -m'Bump up version number'
git tag ${VER}

release:
git push origin main --tag
release_darwin:
goreleaser --config .goreleaser/darwin.yml --rm-dist

.PHONY: default test

0 comments on commit efe0c6e

Please sign in to comment.