backport 176b135 #7
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: 'release-happ' | |
on: | |
push: | |
branches: | |
- release-happ-0.3 | |
jobs: | |
publish-happ: | |
permissions: | |
contents: write | |
runs-on: ubuntu-22.04 | |
outputs: | |
releaseId: ${{ steps.create-release.outputs.id }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- uses: actions/checkout@v3 | |
- name: Install nix | |
uses: cachix/install-nix-action@v18 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
experimental-features = flakes nix-command | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: holochain-ci | |
- name: Install and test | |
run: | | |
nix-store --gc | |
nix develop --command bash -c "holochain --version && npm run build:happ" | |
- name: Retrieve version | |
run: | | |
echo "APP_VERSION=$(cat package.json | grep -oP '(?<="version": ")[^"]*')" >> $GITHUB_OUTPUT | |
echo "HDK_VERSION=$(grep hdk Cargo.toml)" >> $GITHUB_OUTPUT | |
echo "HDI_VERSION=$(grep hdi Cargo.toml)" >> $GITHUB_OUTPUT | |
id: version | |
- id: create-release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: 'workdir/tools-library.happ' | |
body: '${{ steps.version.outputs.HDK_VERSION }}<br>${{ steps.version.outputs.HDI_VERSION }}' | |
name: v${{ steps.version.outputs.APP_VERSION }} | |
tag: v${{ steps.version.outputs.APP_VERSION }} | |
prerelease: true | |
draft: true |