fix(ci): exclude rln-wasm since it has its own step now (#73)

* fix(ci): exclude rln-wasm since it has its own step now

* fix(ci): use stable toolchain

* fix(ci): paths for release notes

* fix(ci): release path

* test(ci): check the tree for filepaths

* test(ci): check the tree for filepaths

* test(ci): tighten name and release assets

* test(ci): auto generated release notes

* fix(ci): remove commit hash from asset name for determinism

* test(ci): start tag should be last release
This commit is contained in:
Aaryamann Challani 2022-11-16 20:06:17 +05:30 committed by GitHub
parent 3d943bccb6
commit 25bcb7991b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 43 deletions

View File

@ -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 }}