-
-
Notifications
You must be signed in to change notification settings - Fork 340
73 lines (65 loc) · 1.81 KB
/
release.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
name: release-workflow
# https://victoronsoftware.com/posts/github-reusable-workflows-and-steps/
on:
push:
tags:
- '**'
workflow_dispatch:
env:
NODE_VERSION: 22
# NODE_OPTIONS: --openssl-legacy-provider
# TODO: Handle browser extension release
jobs:
vars:
runs-on: ubuntu-latest
outputs:
node_version: ${{ env.NODE_VERSION }}
steps:
- run: echo "Exposing env vars"
prepare-release:
name: Prepare release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- id: release-draft
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.github_token }}
prerelease: false
draft: true
generate_release_notes: true
outputs:
release-tag: ${{ steps.release-draft.outputs.id }}
electron:
needs: vars
uses: ./.github/workflows/_publish-electron.yml
with:
node_version: ${{ needs.vars.outputs.node_version }}
secrets: inherit
npm:
needs: [electron, vars]
# We do not need to check out the repository to use the reusable workflow
uses: ./.github/workflows/_publish-npm.yml
with:
node_version: ${{ needs.vars.outputs.node_version }}
secrets: inherit
publish-release:
name: Publish release
runs-on: ubuntu-latest
needs: [prepare-release, electron]
steps:
- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.prepare-release.outputs.release-tag }}
sites:
needs: [vars, publish-release]
uses: ./.github/workflows/_deploy-sites.yml
with:
node_version: ${{ needs.vars.outputs.node_version }}
deploy_docs: true
deploy_redirect: false
deploy_sandbox: false
secrets: inherit