-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (73 loc) · 1.98 KB
/
release.yml
File metadata and controls
85 lines (73 loc) · 1.98 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
82
83
84
85
name: Release
on:
workflow_dispatch:
inputs:
branch:
description: 'The branch to release from (e.g., main, beta, next). Semantic-release must be configured for this branch.'
required: true
default: 'main'
push:
branches:
- main
- beta
jobs:
build:
strategy:
fail-fast: false
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Setup zig
uses: mlugg/setup-zig@v1
- name: Build
run: bun run build.ts
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: memoryprocess
path: lib/
release:
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
persist-credentials: false
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: memoryprocess
path: lib/
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Configure npm
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}