Skip to content

Commit

Permalink
Merge pull request #18 from erodozer/main
Browse files Browse the repository at this point in the history
update release step
  • Loading branch information
you-win authored Dec 31, 2024
2 parents 77b5ad1 + c11b579 commit 2c04f34
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ jobs:
name: ${{ env.project }}.${{ matrix.platform }}.${{ matrix.arch }}
path: release

release:
release-latest:
needs: [package]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/master') }}
steps:
- name: load artifacts
uses: actions/download-artifact@v4
Expand All @@ -119,15 +119,34 @@ jobs:
- run: ls -R artifacts
- run: zip -r ../../${{ env.project }}.windows.x86_64.zip *
working-directory: artifacts/${{ env.project }}.windows.x86_64
- name: tag prerelease
uses: erodozer/github-tag-action@fix-tag-existing
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: latest
tag_prefix: ""
force_update: true
- name: push prerelease
uses: softprops/action-gh-release@v1
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v2
with:
tag_name: latest
prerelease: true
files: ${{ env.project }}.windows.x86_64.zip

release:
needs: [package]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: load artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: ${{ env.project }}.*.*
- run: ls -R artifacts
- run: zip -r ../../${{ env.project }}.windows.x86_64.zip *
working-directory: artifacts/${{ env.project }}.windows.x86_64
- name: push release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v2
with:
files: ${{ env.project }}.windows.x86_64.zip
files: ${{ env.project }}.windows.x86_64.zip

0 comments on commit 2c04f34

Please sign in to comment.