diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 6c9c838..bedd0dc 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -11,31 +11,26 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v2 - - name: Declare short sha - id: vars - shell: bash - run: | - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Install nightly toolchain + - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: stable override: true - name: Update git submodules run: git submodule update --init --recursive - name: cargo build run: | - cargo build --release --workspace + cargo build --release --workspace --exclude rln-wasm mkdir release cp target/release/librln* release/ - tar -czvf linux-rln-${{steps.vars.outputs.sha_short}}.tar.gz release/ + tar -czvf linux-rln.tar.gz release/ - name: Upload archive artifact uses: actions/upload-artifact@v2 with: name: linux-archive - path: linux-rln-${{steps.vars.outputs.sha_short}}.tar.gz + path: linux-rln.tar.gz retention-days: 2 macos: @@ -46,31 +41,26 @@ jobs: uses: actions/checkout@v2 with: ref: master - - name: Declare short sha - id: vars - shell: bash - run: | - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Install nightly toolchain + - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: stable override: true - name: Update git submodules run: git submodule update --init --recursive - name: cargo build run: | - cargo build --release --workspace + cargo build --release --workspace --exclude rln-wasm mkdir release cp target/release/librln* release/ - tar -czvf macos-rln-${{steps.vars.outputs.sha_short}}.tar.gz release/ + tar -czvf macos-rln.tar.gz release/ - name: Upload archive artifact uses: actions/upload-artifact@v2 with: name: macos-archive - path: macos-rln-${{steps.vars.outputs.sha_short}}.tar.gz + path: macos-rln.tar.gz retention-days: 2 browser-rln-wasm: @@ -87,11 +77,6 @@ jobs: profile: minimal toolchain: stable override: true - - name: Declare short sha - id: vars - shell: bash - run: | - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - run: git submodule update --init --recursive - name: Install wasm-pack uses: jetli/wasm-pack-action@v0.3.0 @@ -102,14 +87,14 @@ jobs: cargo make build mkdir release cp pkg/** release/ - tar -czvf browser-rln-wasm-${{steps.vars.outputs.sha_short}}.tar.gz release/ + tar -czvf browser-rln-wasm.tar.gz release/ working-directory: rln-wasm - name: Upload archive artifact uses: actions/upload-artifact@v2 with: name: browser-rln-wasm-archive - path: browser-rln-wasm-${{steps.vars.outputs.sha_short}}.tar.gz + path: rln-wasm/browser-rln-wasm.tar.gz retention-days: 2 @@ -124,18 +109,6 @@ jobs: ref: master - name: Download artifacts uses: actions/download-artifact@v2 - - name: Create release notes - run: | - echo "## Release notes" > release-notes.md - echo "### Linux" >> release-notes.md - tar -xvf linux-rln-*.tar.gz - ls -l release >> release-notes.md - echo "### MacOS" >> release-notes.md - tar -xvf macos-rln-*.tar.gz - ls -l release >> release-notes.md - echo "### Browser (RLN WASM)" >> release-notes.md - tar -xvf browser-rln-wasm-*.tar.gz - ls -l release >> release-notes.md - name: Delete tag uses: dev-drprasad/delete-tag-and-release@v0.2.0 @@ -147,11 +120,14 @@ jobs: - name: Create prerelease run: | + start_tag=$(gh release list -L 2 --exclude-drafts | grep -v nightly | cut -d$'\t' -f3) gh release create nightly --prerelease --target master \ - --title 'Nightly build ("master" branch)' --notes-file release_notes.md \ - linux-archive/* \ - macos-archive/* \ - browser-rln-wasm-archive/* + --title 'Nightly build ("master" branch)' \ + --generate-notes \ + --notes-start-tag $start_tag \ + linux-archive/linux-rln.tar.gz \ + macos-archive/macos-rln.tar.gz \ + browser-rln-wasm-archive/browser-rln-wasm.tar.gz env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}