Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinTan authored Feb 8, 2023
1 parent 6301ba6 commit ab91131
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
Expand All @@ -17,7 +19,9 @@ jobs:

- name: install rpm
if: runner.os == 'macOS'
run: rpmbuild --version || brew install -q rpm
run: |
rpmbuild --version || wget -q https://raw.githubusercontent.com/GavinTan/files/master/picgo/rpm.rb && brew install -q rpm.rb
rm -rf rpm.rb
- name: yarn install
run: yarn
Expand All @@ -28,16 +32,17 @@ jobs:
- run: mv dist release

- name: Create Tag
if:
run: |
version=`node -p "require('./package.json').version"`
git tag "v$version"
git push origin "v$version"
version=v`node -p "require('./package.json').version"`
if [ ! $(git tag -l $version) ]; then
git tag $version
git push origin $version
fi
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}

0 comments on commit ab91131

Please sign in to comment.