Skip to content

Add github workflow to release webhapps via CI #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/release-webhapps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'release-webhapps'
on:
push:
branches:
- release-webhapps

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: Extend space
uses: ./.github/actions/extend-space

- name: Install nix
uses: cachix/install-nix-action@v20
with:
install_url: https://releases.nixos.org/nix/nix-2.23.0/install

- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- name: Install and build
run: |
nix-store --gc
nix develop --command bash -c "holochain --version && yarn && desktop:build-webhapp && yarn moss:build-webhapp"

- name: Retrieve version
run: |
echo "APP_VERSION=$(cat package.json | grep -oP '(?<="version": ")[^"]*')" >> $GITHUB_OUTPUT
id: version

- id: create-release
uses: ncipollo/release-action@v1
with:
allowUpdates: false
artifacts:
- 'happs/happ/workdir/acorn-desktop.webhapp'
- 'weave-tool/acorn-moss.webhapp'
body: 'See assets below to download and install this version.'
name: v${{ steps.version.outputs.APP_VERSION }}-alpha
tag: v${{ steps.version.outputs.APP_VERSION }}-alpha
prerelease: true
draft: true