Skip to content

Commit

Permalink
Fix automatic releases (#24)
Browse files Browse the repository at this point in the history
* Update releases properly

* Fix conditional execution
  • Loading branch information
viluon authored Jun 19, 2024
1 parent 9300159 commit 8a55a7f
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,42 @@ jobs:
retention-days: 90
- name: test
run: cargo test --verbose --release
- uses: actions/upload-artifact@v4
with:
name: binaries
path: |
afx.upx
target/release/afx
release:
needs: build-nix
if: ${{ github.ref == 'refs/heads/main' }}
concurrency:
group: release
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- name: download artifact
uses: actions/download-artifact@v4
with:
name: binaries
path: binaries/
- name: delete release
continue-on-error: true
run: gh release delete latest --cleanup-tag
env:
GITHUB_TOKEN: ${{ github.token }}
- name: create release
if: ${{ github.ref == 'refs/heads/main' }}
uses: softprops/action-gh-release@v2
id: create-release
with:
draft: true
prerelease: true
fail_on_unmatched_files: true
files: |
afx.upx
target/release/afx
release-files/*
name: afx preview
tag_name: latest
- name: publish release
if: ${{ github.ref == 'refs/heads/main' }}
uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down

0 comments on commit 8a55a7f

Please sign in to comment.