From 1dd364cd46db48d5b12aa95a5158793cf038b6d7 Mon Sep 17 00:00:00 2001 From: Jeremy Gao <145064583+WenSimEHRP@users.noreply.github.com> Date: Sun, 12 May 2024 18:11:26 -0700 Subject: [PATCH] Fix: actions --- .github/workflows/create_release.yml | 46 +++++----------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 2bb2a0a..9dcbc3d 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -2,62 +2,30 @@ name: Release on: workflow_dispatch: + push: + tags: + - "*" jobs: build: name: Create Release runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v2 - continue-on-error: true - name: Install Dependencies run: | bash install_dependencies.sh pip3 install -r requirements.txt - continue-on-error: false - name: Build id: build run: make all - continue-on-error: true - - - name: Set Tag Name - id: set_tag - run: echo "tag_name=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV - shell: bash - - - name: Check Build Status - id: check_status - run: | - if [ "${{ steps.build.outcome }}" != "success" ] - then - echo "One or more steps failed. Skipping release creation." - echo "::set-output name=skip_release::true" - fi - continue-on-error: true - name: Create Release - id: create_release - uses: actions/create-release@v1 - with: - tag_name: ${{ env.tag_name }} - release_name: Release ${{ env.tag_name }} - body: | - Release ${{ env.tag_name }} - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ steps.check_status.outputs.skip_release != 'true' }} - - - name: Upload Release Asset - uses: actions/upload-release-asset@v1 + uses: ncipollo/release-action@v1 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./cns.grf - asset_name: cns.grf - asset_content_type: binary/octet-stream - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + artifacts: "cns.grf"