-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (72 loc) · 2.21 KB
/
cd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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'
permissions:
contents: write
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 }}