Skip to content

CD

CD #2

Workflow file for this run

name: CD
on:
release:
types:
- published
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v4
- name: Setup Environment
uses: halo-sigs/reusable-workflows/plugin-setup-env@main
with:
cache-dept-path: ui/pnpm-lock.yaml
skip-node-setup: false
node-version: 20
pnpm-version: 9
java-version: 17
- name: Build
run: |
version=${{ github.event.release.tag_name }}
unsplashApiKey=${{ secrets.UNSPLASH_API_KEY }}
pexelsApiKey=${{ secrets.PEXELS_API_KEY }}
pixabayApiKey=${{ secrets.PIXABAY_API_KEY }}
./gradlew -Pversion=${version#v} -PunsplashApiKey=${unsplashApiKey} -PpexelsApiKey=${pexelsApiKey} -PpixabayApiKey=${pixabayApiKey} build -x check
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: build/libs
retention-days: 1
github-release:
name: GitHub Release
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: build/libs
- name: Upload Release Assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} build/libs/*
appstore-release:
name: App Store Release
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: build/libs
- name: Release to App Store
uses: halo-sigs/app-store-release-action@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
app-id: "app-JxVVb"
halo-backend-baseurl: "https://www.halo.run"
release-id: ${{ github.event.release.id }}
assets-dir: "build/libs"
halo-pat: ${{ secrets.HALO_PAT }}