From 70142847198bfa06565a66abfa7de5381f7a1008 Mon Sep 17 00:00:00 2001 From: vincss Date: Thu, 4 Mar 2021 14:32:04 +0100 Subject: [PATCH] Create release (ci) --- .github/workflows/release_nodejs.yml | 38 +++++++--------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release_nodejs.yml b/.github/workflows/release_nodejs.yml index 170a4b2..0598c34 100644 --- a/.github/workflows/release_nodejs.yml +++ b/.github/workflows/release_nodejs.yml @@ -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 \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file