bumped to new rust-utils #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'publish' | |
on: | |
push: | |
branches: | |
- release-0.10.7 | |
jobs: | |
publish: | |
strategy: | |
fail-fast: false | |
matrix: | |
# platform: [windows-2019] | |
platform: [windows-2019, macos-11, ubuntu-22.04] | |
# platform: [ubuntu-22.04] | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.13 | |
permissions: | |
contents: write | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: Retrieve version | |
run: | | |
echo "Retrieved App version: $(node -p -e "require('./package.json').version")" | |
echo "APP_VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT | |
id: version | |
shell: bash | |
- name: install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
toolchain: stable | |
- name: install Go stable | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- name: Environment setup | |
run: | | |
mkdir resources/default-apps | |
mkdir resources/bins | |
yarn setup:release | |
curl -L --output resources/default-apps/we.happ https://github.com/lightningrodlabs/we/releases/download/we-alpha-happ-v0.10.0/we.happ | |
- name: Build zomes | |
run: | | |
rustup target add wasm32-unknown-unknown | |
yarn build:zomes | |
- id: create-release | |
uses: ncipollo/release-action@v1 | |
with: | |
body: 'See assets below to download and install this version.' | |
name: Moss (Alpha) v${{ steps.version.outputs.APP_VERSION }} | |
tag: we-alpha-v${{ steps.version.outputs.APP_VERSION }} | |
prerelease: true | |
skipIfReleaseExists: true | |
- name: build and upload the app (macOS) | |
if: matrix.platform == 'macos-11' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn build:mac | |
ls dist | |
gh release upload "we-alpha-v${{ steps.version.outputs.APP_VERSION }}" "dist/org.lightningrodlabs.we-electron-alpha-${{ steps.version.outputs.APP_VERSION }}.dmg" --clobber | |
- name: build and upload the app (Ubuntu 22.04) | |
if: matrix.platform == 'ubuntu-22.04' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn build:linux | |
ls dist | |
gh release upload "we-alpha-v${{ steps.version.outputs.APP_VERSION }}" "dist/org.lightningrodlabs.we-electron-alpha-${{ steps.version.outputs.APP_VERSION }}.AppImage" --clobber | |
- name: build and upload the app (Windows) | |
shell: bash | |
if: matrix.platform == 'windows-2019' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
# Retry 5 times on Windows due to weird flaky issue | |
yarn build:win || yarn build:win || yarn build:win || yarn build:win || yarn build:win | |
ls dist | |
gh release upload "we-alpha-v${{ steps.version.outputs.APP_VERSION }}" "dist/org.lightningrodlabs.we-electron-alpha-${{ steps.version.outputs.APP_VERSION }}-setup.exe" --clobber |