Skip to content

Commit 5fb8db7

Browse files
Merge pull request #20 from journeyapps/chore/workflow
initial workflow
2 parents b4f9ea9 + fc74d36 commit 5fb8db7

File tree

4 files changed

+65
-121
lines changed

4 files changed

+65
-121
lines changed

.github/workflows/dev-package.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch: # For dev publishing
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
permissions:
11+
id-token: write # Required for OIDC / trusted publishing
12+
contents: write # Required for changesets pushing commits
13+
pull-requests: write # Required for changesets creating PRs
14+
15+
env:
16+
SECRETS: ${{ toJSON(secrets) }}
17+
GITHUB_TOKEN: ${{ secrets.SHARED_GH_TOKEN }}
18+
19+
jobs:
20+
build:
21+
name: Publish Packages
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Repo
25+
uses: actions/checkout@v5
26+
27+
- name: Enable Corepack
28+
run: corepack enable
29+
30+
- name: Setup NodeJS
31+
uses: actions/setup-node@v6
32+
with:
33+
node-version-file: ".nvmrc"
34+
cache: pnpm
35+
36+
37+
- name: Update npm
38+
run: |
39+
npm install -g npm@latest
40+
npm --version
41+
42+
- name: Install dependencies
43+
run: pnpm install --no-frozen-lockfile
44+
45+
- name: Build
46+
run: pnpm build
47+
48+
# - name: Create Release Pull Request or Publish to npm
49+
# id: changesets
50+
# uses: changesets/action@v1
51+
# if: ${{ github.event_name == 'push' }}
52+
# with:
53+
# version: pnpm ci:version
54+
# publish: pnpm ci:publish
55+
# env:
56+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
58+
- name: Dev publish
59+
if: ${{ github.event_name == 'workflow_dispatch' }}
60+
run: |
61+
pnpm changeset version --no-git-tag --snapshot dev
62+
pnpm changeset publish --tag dev
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup NodeJS
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: 22.16
29+
node-version-file: '.nvmrc'
3030

3131
- uses: pnpm/action-setup@v4
3232
name: Install pnpm

0 commit comments

Comments
 (0)