Skip to content

Commit

Permalink
Fix: actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
WenSimEHRP committed May 13, 2024
1 parent 3c39550 commit e861c5c
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,45 @@ jobs:
continue-on-error: false

- name: Build
id: build
run: make all
continue-on-error: true

- name: Set Tag Name
id: set_tag
run: echo "::set-output name=tag_name::$(date +'%Y%m%d%H%M%S')"
run: echo "tag_name=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
shell: bash

- name: Check Build Status
id: check_status
run: |
if [ "${{ job.status }}" != "success" ]
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: ${{ steps.set_tag.outputs.tag_name }}
release_name: Release ${{ steps.set_tag.outputs.tag_name }}
tag_name: ${{ env.tag_name }}
release_name: Release ${{ env.tag_name }}
body: |
Changes in this Release:
- Feature 1
- Feature 2
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
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 }}

0 comments on commit e861c5c

Please sign in to comment.