forked from marwie/npx-test
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (52 loc) · 2.34 KB
/
test.yml
File metadata and controls
68 lines (52 loc) · 2.34 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
name: Publish test package to NPM
on:
push:
branches:
- main
jobs:
# publish:
# runs-on: ubuntu-latest
# timeout-minutes: 5
# defaults:
# run:
# working-directory: ./
# steps:
# - uses: actions/checkout@v4
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org'
# - name: Install dependencies
# run: npm install
# - name: Run publish command
# id: publish
# run: npx . publish "./test" --webhook "${{ secrets.DISCORD_WEBHOOK_TEST_RELEASE }}" --access-token "${{ secrets.NPM_TOKEN }}" --version+hash --tag github --version+tag --create-tag "test/" --llm-api-key "${{ secrets.LLM_API_KEY }}"
# - name: Print output
# run: |
# echo "Package version: ${{ steps.publish.outputs.package-version }}"
# - name: Run publish without tag
# run: npx . publish "./test" --webhook "${{ secrets.DISCORD_WEBHOOK_TEST_RELEASE }}" --access-token "${{ secrets.NPM_TOKEN }}" --version+hash
# - name: Run publish without commit hash
# run: npx . publish "./test" --webhook "${{ secrets.DISCORD_WEBHOOK_TEST_RELEASE }}" --access-token "${{ secrets.NPM_TOKEN }}"
# - name: Just add a tag
# run: npx . publish "./test" --webhook "${{ secrets.DISCORD_WEBHOOK_TEST_RELEASE }}" --access-token "${{ secrets.NPM_TOKEN }}" --tag github-2
# OIDC-based publishing (Trusted Publishing)
# Requires: Trusted Publisher configured on npmjs.com for the package
publish-oidc:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- name: Publish with OIDC
id: publish-oidc
run: npx . publish "./test" --webhook "${{ secrets.DISCORD_WEBHOOK_TEST_RELEASE }}" --oidc --version+hash --tag oidc --version+tag
- run: echo "Published ${{ steps.publish-oidc.outputs.package-version }}"