-
Notifications
You must be signed in to change notification settings - Fork 21
97 lines (81 loc) · 2.76 KB
/
tag-release.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build and Push Docker Images on Tag
on:
push:
tags:
- "v*.*.*"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU and Docker Buildx
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry (GHCR)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Expose GH Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Build and Push Docker Images
run: |
TAG=${GITHUB_REF#refs/tags/} make build_and_push_images
env:
REGISTRY: ghcr.io
ORG: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
GITHUB_WORKFLOW: ${{ github.workflow }}
build-tauri:
runs-on: [macos-latest]
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./tauri/src-tauri -> target"
- name: Set up Nodejs
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install Frontend deps
run: cd tauri && npm install
- name: Populate key
run: |
echo "${{ secrets.APPLE_API_KEY_B64 }}"|base64 --decode > ./apple.p8
- name: get release version
id: get_release_version
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_KEY_PATH: ./apple.p8
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
with:
releaseId: ${process.env.TAG}
- name: publish release
id: publish-release
uses: actions/github-script@v7
with:
script: |
github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.TAG,
})