-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.34 KB
/
publish.yaml
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
name: Publish Package
on:
workflow_dispatch:
inputs:
release_tag:
description: "Release Tag"
required: true
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun Environment
uses: oven-sh/setup-bun@v1
- name: Setup NPM
uses: actions/setup-node@v3
- name: Configure Github User
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install Dependancies
run: bun install
- name: Build Package
run: bun run build
- name: Authenticate With NPM
run: |
echo "@tlscipher:registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Package
run: npm publish --access=public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Github Release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.inputs.release_tag }}
makeLatest: "true"
token: ${{ secrets.GH_TOKEN }}