-
Notifications
You must be signed in to change notification settings - Fork 7
106 lines (91 loc) · 2.69 KB
/
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
98
99
100
101
102
103
104
105
106
name: Release
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
- '.vscode/**'
- '.idea/**'
workflow_dispatch:
inputs:
production-release:
description: 'Production release?'
required: true
default: 'true'
concurrency: create-release
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
packages: read
jobs:
ci:
name: CI
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
working-directory: .
node-version: 20.x
audit-script: npm run audit
compile-script: npm run check-types
test-script: npm run tests
build-website:
if: false
name: Build Website
uses: makerxstudio/shared-config/.github/workflows/node-build-zip.yml@main
with:
node-version: 20.x
build-path: dist
artifact-name: website
static-site: true
static-site-env-prefix: VITE
needs:
- ci
create-release:
runs-on: [ubuntu-20.04]
needs:
- ci
name: Create release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create release
id: create-release-action
uses: ./.github/actions/create-release
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
production-release: ${{ github.ref_name == 'main' && inputs.production-release == 'true' }}
node-version: 20
outputs:
release-published: ${{ steps.create-release-action.outputs.release-published }}
release-version: ${{ steps.create-release-action.outputs.release-version }}
release-id: ${{ steps.create-release-action.outputs.release-id }}
build-tauri:
name: Build Tauri app
needs:
- create-release
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-20.04]
if: ${{ needs.create-release.outputs.release-published == 'true' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install npm dependencies
run: npm install
- name: bump version in tauri.conf.json
run: |
sed -i '' "s/\"version\": \"0.0.0\"/\"version\": \"${{ needs.create-release.outputs.release-version }}\"/g" "src-tauri/tauri.conf.json"
- name: build for ubuntu
if: ${{ runner.os == 'Linux' }}
uses: ./.github/actions/build-ubuntu