Skip to content

Commit

Permalink
chore: update cd.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Nov 6, 2024
1 parent 94d2cf6 commit 49549d0
Showing 1 changed file with 66 additions and 11 deletions.
77 changes: 66 additions & 11 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,69 @@ on:
- published

jobs:
cd:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v2
secrets:
halo-pat: ${{ secrets.HALO_PAT }}
permissions:
contents: write
with:
app-id: app-NRcGw
node-version: "20"
pnpm-version: "9"
ui-path: "ui"
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 }}
./gradlew -Pversion=${version#v} build -x check
env:
UNSPLASH_API_KEY: ${{ secrets.UNSPLASH_API_KEY }}
PEXELS_API_KEY: ${{ secrets.PEXELS_API_KEY }}
PIXABAY_API_KEY: ${{ secrets.PIXABAY_API_KEY }}
- 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 }}

0 comments on commit 49549d0

Please sign in to comment.