Skip to content

Commit

Permalink
Create release (ci)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincss committed Mar 4, 2021
1 parent c9a8726 commit 7014284
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions .github/workflows/release_nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,13 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- name: Create Release
id: create_release
uses: actions/create-release@v1
- run: |
set -x
assets=()
for asset in ./build/*; do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: ./bin/sleepingServerStarter.exe
asset_name: sleepingServerStarter_Windows_${{ github.ref }}
asset_content_type: application/octet-stream
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: ./bin/sleepingServerStarter.run
asset_name: sleepingServerStarter_Linux_${{ github.ref }}
asset_content_type: application/octet-stream
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7014284

Please sign in to comment.