-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (129 loc) · 4.4 KB
/
publish.yml
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: 'publish'
on:
push:
branches:
- main
jobs:
# version-check:
# runs-on: ubuntu-20.04
# outputs:
# version: ${{ steps.check-for-version-change.outputs.version}}
# has-version-change: ${{ steps.check-for-version-change.outputs.has-version-change }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: lts/*
# - id: check-for-version-change
# uses: ./.github/actions/version-check
# env:
# GH_TOKEN: ${{ github.token }}
# create-release:
# needs: version-check
# if: needs.version-check.outputs.has-version-change == 'true'
# runs-on: ubuntu-latest
# outputs:
# release-id: ${{ steps.create-release.outputs.result }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: lts/*
# - id: create-release
# uses: actions/github-script@v7
# with:
# script: |
# const { data } = await github.rest.repos.createRelease({
# owner: context.repo.owner,
# repo: context.repo.repo,
# tag_name: `v${{ needs.version-check.outputs.version }}`,
# name: `ISOS v${{ needs.version-check.outputs.version }}`,
# draft: true,
# prerelease: false,
# generate_release_notes: true
# })
# return data.id
# build-tauri:
# needs: create-release
# permissions:
# contents: write
# strategy:
# fail-fast: false
# matrix:
# include:
# - platform: 'macos-latest'
# args: '--target aarch64-apple-darwin'
# - platform: 'macos-latest'
# args: '--target x86_64-apple-darwin'
# - platform: 'ubuntu-20.04'
# args: ''
# - platform: 'windows-latest'
# args: ''
# runs-on: ${{ matrix.platform }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: lts/*
# - name: install Rust stable
# uses: dtolnay/rust-toolchain@stable
# with:
# targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
# - name: install dependencies (ubuntu only)
# if: matrix.platform == 'ubuntu-20.04'
# run: |
# sudo apt-get update
# sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
# - name: install frontend dependencies
# run: npm ci
# - uses: tauri-apps/tauri-action@v0
# id: build-tauri-app
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
# APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
# APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
# APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
# APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
# with:
# releaseId: ${{ needs.create-release.outputs.release-id }}
# args: ${{ matrix.args }}
# post-release:
# needs: [create-release, build-tauri]
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: lts/*
# - uses: ./.github/actions/post-release
# env:
# GH_TOKEN: ${{ github.token }}
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# RELEASE_ID: ${{ needs.create-release.outputs.release-id }}
publish-docs:
# needs: version-check
runs-on: ubuntu-20.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm ci
- run: VITE_ISOS_VERSION=${{ needs.version-check.outputs.version }} npm run build -- --base /isos/
- uses: actions/upload-pages-artifact@v3
with:
path: ./docs/dist
- id: deployment
uses: actions/deploy-pages@v4