Repository navigation
81 lines (73 loc) · 2.12 KB
/
Copy pathpublish.yml
File metadata and controls
81 lines (73 loc) · 2.12 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
79
80
81
name: Publish
on:
push:
tags:
- 'v*'
permissions: {}
jobs:
validate-release:
name: Validate release tag
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1.12.0
with:
node-version-file: .node-version
run-install: false
cache: false
- name: Validate package versions and release channel
run: node .github/scripts/release-policy.ts
ci:
needs: validate-release
uses: ./.github/workflows/ci.yml
permissions:
contents: read
platform-ci:
needs: validate-release
uses: ./.github/workflows/platform-ci.yml
with:
require-schema-compat: true
permissions:
contents: read
deployments: read
prepublish-test:
name: Prepublish Test
needs: validate-release
uses: ./.github/workflows/prepublish-test.yml
with:
suite: full
include_macos: true
permissions:
contents: read
pull-requests: read
publish:
needs: [ci, platform-ci, prepublish-test]
runs-on: ubuntu-latest
environment: Release
permissions:
contents: read
id-token: write
env:
VOID_PLATFORM_SOURCE_REVISION: ${{ github.sha }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1.12.0
with:
node-version-file: .node-version
cache: true
registry-url: https://registry.npmjs.org
- name: Validate release versions and channel
id: release
run: node .github/scripts/release-policy.ts
- run: vp run build
- run: npm install -g npm@11
- name: Publish public packages
env:
RELEASE_NPM_TAG: ${{ steps.release.outputs.npm-tag }}
run: vp pm publish -r --access public --tag "$RELEASE_NPM_TAG" --no-git-checks