Skip to content

Commit

Permalink
Update c-cpp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrywu authored Nov 17, 2021
1 parent f1474de commit 43ee65f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Get current date
id: date
run: echo "::set-output name=date::$(env TZ=Asia/Taipei date +'%Y-%m-%d_%H-%M-%S')"
run: echo "::set-output name=date::$(env TZ=Asia/Taipei date +'%Y%m%d_%H%M%S')"
- name: Get respository name
id: repository_name
run: echo "::set-output name=repository_name::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')"
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Upload build output
uses: actions/upload-artifact@v2
with:
name: ${{ steps.repository_name.outputs.repository_name }}-${{ steps.branch.outputs.branch }}
name: ${{ steps.repository_name.outputs.repository_name }}_${{ steps.branch.outputs.branch }}
path: a.out

- name: Create Release
Expand All @@ -47,8 +47,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.repository_name.outputs.repository_name }}-${{ steps.branch.outputs.branch }}-${{ steps.date.outputs.date }}
release_name: ${{ steps.repository_name.outputs.repository_name }}-${{ steps.branch.outputs.branch }}-${{ steps.date.outputs.date }}
tag_name: ${{ steps.branch.outputs.branch }}_${{ steps.date.outputs.date }}
release_name: ${{ steps.branch.outputs.branch }}_${{ steps.date.outputs.date }}
draft: false
prerelease: false

Expand All @@ -60,7 +60,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ github.workspace }}/a.out
asset_name: ${{ steps.repository_name.outputs.repository_name }}-${{ steps.branch.outputs.branch }}-${{ steps.date.outputs.date }}
asset_name: ${{ steps.repository_name.outputs.repository_name }}_${{ steps.branch.outputs.branch }}_${{ steps.date.outputs.date }}
asset_content_type: application/octet-stream

- name: Send mail
Expand Down

0 comments on commit 43ee65f

Please sign in to comment.