-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (66 loc) · 2.08 KB
/
release.yml
File metadata and controls
77 lines (66 loc) · 2.08 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
name: Release
on:
workflow_dispatch:
inputs:
npm_tag:
description: "npm dist-tag"
required: true
type: choice
options:
- latest
- alpha
version:
description: "Version to publish (e.g. 1.0.0, 1.0.0-alpha.1)"
required: true
type: string
permissions:
contents: write
id-token: write
jobs:
release:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: voidzero-dev/setup-vp@v1
with:
node-version: "24"
cache: true
- name: Build
run: vp pack
- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Set version
run: |
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
pkg.version = '${{ inputs.version }}';
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
"
- name: Publish @qwik.dev/cli
run: pnpm publish --tag ${{ inputs.npm_tag }} --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Uncomment when create-qwik is ready for v2
# - name: Publish create-qwik
# run: |
# cp package.json package.json.bak
# node -e "
# const fs = require('fs');
# const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
# pkg.name = 'create-qwik';
# fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
# "
# pnpm publish --tag ${{ inputs.npm_tag }} --access public --no-git-checks
# mv package.json.bak package.json
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ inputs.version }}
name: v${{ inputs.version }}
generate_release_notes: true