-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (46 loc) · 1.37 KB
/
release.yaml
File metadata and controls
52 lines (46 loc) · 1.37 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
name: Release Package
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
id: release-please
with:
release-type: node
publish-package:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Nix
uses: ./.github/actions/setup-nix
- name: Setup Node.js for npm
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
registry-url: 'https://registry.npmjs.org'
node-version: lts/*
- name: 📦 Pack package
run: nix develop --command pnpm pack
- name: 🚀 Publish package
shell: bash
run: |
PACKAGE_TGZ=$(ls *.tgz | head -n 1)
echo "Publishing package: $PACKAGE_TGZ"
npm publish "$PACKAGE_TGZ" --access public