-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (48 loc) · 1.46 KB
/
ci.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
54
55
56
name: Build and Release QHotkeys
on:
push:
branches:
- main # Set this to the branch you want to build from
jobs:
build:
runs-on: ubuntu-latest # Specifies that the job should run on the latest Ubuntu runner
steps:
- uses: actions/checkout@v4 # Checks out your repository under $GITHUB_WORKSPACE
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 'latest'
- name: Install dependencies with Bun
run: bun install
- name: Build app before publishing
run: |
bun run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: dist
publish:
name: Publish to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
name: Download build artifacts
with:
name: build-artifacts
path: dist
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
id: publish # Assign an ID to this step
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Automated Version Bump
if: steps.publish.outcome == 'success'
uses: phips28/[email protected]