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"