Bump android again #16
Workflow file for this run
This file contains hidden or 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: Build and release web app | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version to release" | |
required: true | |
default: "v0.0.0" | |
type: string | |
push: | |
tags: | |
- "v*.*.*" | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 10 | |
run_install: false | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Authenticate NPM registry | |
run: echo -e "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}\n@capawesome-team:registry=https://npm.pkg.github.com/" > ~/.npmrc | |
- name: Add Firebase credentials | |
run: echo '${{ secrets.FIREBASE_CREDS }}' > ./src/firebase.json | |
- name: Write release version | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo Version: $VERSION | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "VITE_VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: pnpm install | |
- name: Production build | |
env: | |
VITE_GOOGLE_STORE_API: ${{ secrets.VITE_GOOGLE_STORE_API }} | |
VITE_APPLE_STORE_API: ${{ secrets.VITE_APPLE_STORE_API }} | |
run: pnpm build | |
- name: Package release tarball | |
if: startsWith(github.ref, 'refs/tags/') | |
run: tar czvf zaparoo_app-web-${VERSION}.tar.gz -C ./dist . | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: zaparoo_app-web-*.tar.gz | |
fail_on_unmatched_files: true | |
make_latest: false | |
permissions: | |
contents: write |