-
-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (49 loc) · 1.77 KB
/
release.yml
File metadata and controls
53 lines (49 loc) · 1.77 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
name: Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
id-token: write # Required for npm trusted publishing with OIDC
contents: write # Required for changesets/action
pull-requests: write # Required for changesets/action
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- run: npm install
- run: npm run build
- name: set release variables
run: echo "date=$(date -u +'%Y-%m-%dT%H:%MZ')" >> $GITHUB_ENV
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: dotansimha/changesets-action@069996e9be15531bd598272996fa23853d61590e # v1.5.2
with:
version: npm run version
publish: npx @changesets/cli publish
createGithubReleases: aggregate
githubReleaseName: Release ${{ env.date }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Wait for npm packages to be available
if: steps.changesets.outputs.publishedPackages != '[]'
run: ./scripts/wait-for-npm-packages.sh '${{ steps.changesets.outputs.publishedPackages }}'
- run: npx @vscode/vsce publish --no-git-tag-version --skip-duplicate
if: steps.changesets.outputs.hasChangesets == 'false'
working-directory: packages/vscode
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- run: npx ovsx publish --skip-duplicate
if: steps.changesets.outputs.hasChangesets == 'false'
working-directory: packages/vscode
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}