forked from cobusgreyling/loop-engineering
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 981 Bytes
/
Copy pathrelease-loop-init.yml
File metadata and controls
41 lines (35 loc) · 981 Bytes
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
name: Release loop-init
on:
push:
tags:
- 'loop-init-v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish (e.g. loop-init-v1.2.2)'
required: true
type: string
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', github.event.inputs.tag) || github.ref }}
- uses: actions/setup-node@v6
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Ensure npm supports trusted publishing (OIDC)
run: npm install -g npm@latest
- name: Test, build & publish
working-directory: tools/loop-init
run: |
npm ci
npm test
npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}