-
Notifications
You must be signed in to change notification settings - Fork 11
78 lines (66 loc) · 2.17 KB
/
release-stable.yml
File metadata and controls
78 lines (66 loc) · 2.17 KB
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
name: Release Stable
run-name: Release Stable ${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'Tag (vX.Y.Z-preview)'
required: true
type: string
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
release-stable:
runs-on: ubuntu-24.04
name: Release
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
# We want to build extension using the code and dependencies as of
# this tag. The scripts, workflows are back-ported, so they can be
# used consistently.
ref: ${{ github.event.inputs.version }}
- name: Environment setup
uses: ./.github/actions/setup
- name: Validate stable release
uses: actions/github-script@v8
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
with:
script: |
const { default: script } = await import('${{ github.workspace }}/.github/actions/validate-stable-release.ts')
await script({ github, context, core })
- name: Build
run: pnpm build --channel=stable
- name: Get built version
uses: actions/github-script@v8
id: version
with:
script: |
const { default: script } = await import('${{ github.workspace }}/.github/actions/get-built-version.ts')
await script({ github, context, core })
- name: Delete existing release # To keep the workflow idempotent.
run: gh release delete v${{ steps.version.outputs.version }} --cleanup-tag --yes
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
- name: Release
uses: softprops/action-gh-release@v2.5.0
with:
files: |
dist/*.zip
tag_name: v${{ steps.version.outputs.version }}
name: v${{ steps.version.outputs.version }}
prerelease: false
fail_on_unmatched_files: true
# - name: Upload to stores
# run: |
# echo 'TODO'