Skip to content

Commit 6b72bb4

Browse files
committed
Publish to internal GitHub Packages registry
1 parent 4567a8f commit 6b72bb4

1 file changed

Lines changed: 20 additions & 36 deletions

File tree

.github/workflows/release.yml

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,43 @@
1-
name: Release
1+
name: Publish to GitHub Packages
22

33
on:
44
push:
55
branches:
6-
- develop
6+
- blue-water-autonomy
77
workflow_dispatch:
88

9-
permissions:
10-
contents: write
11-
issues: write
12-
pull-requests: write
13-
id-token: write
14-
159
jobs:
1610
release:
17-
name: Release
1811
runs-on: ubuntu-latest
19-
if: github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/develop'
12+
permissions:
13+
contents: read
14+
packages: write
15+
2016
steps:
21-
- name: Checkout
17+
- name: Checkout code
2218
uses: actions/checkout@v6
23-
with:
24-
fetch-depth: 0
25-
persist-credentials: false
2619

27-
- name: Setup Node.js
20+
- name: Set up Node.js
2821
uses: actions/setup-node@v6
2922
with:
3023
node-version: "24"
31-
registry-url: "https://registry.npmjs.org/"
24+
registry-url: "https://npm.pkg.github.com"
25+
scope: "@blue-water-autonomy"
3226
cache: "npm"
3327

3428
- name: Install dependencies
3529
run: npm ci
3630

37-
- name: Build core and generate wrappers
31+
- name: Set package name/version
3832
working-directory: ./packages/openbridge-webcomponents
39-
run: npm run build:full
40-
41-
- name: Install wrapper dependencies
42-
run: npm install
33+
run: |
34+
npm pkg set name="@blue-water-autonomy/openbridge-webcomponents"
35+
base=$(node -p "require('./package.json').version.split('-')[0]")
36+
version="${base}-bwa.${GITHUB_RUN_NUMBER}"
37+
npm pkg set version="$version"
4338
44-
- name: Build Angular wrapper
45-
working-directory: ./packages/openbridge-webcomponents-ng
46-
run: npm run build
47-
48-
- name: Generate GitHub App token
49-
id: app-token
50-
uses: actions/create-github-app-token@v1
51-
with:
52-
app-id: ${{ secrets.APP_ID }}
53-
private-key: ${{ secrets.APP_PRIVATE_KEY }}
54-
55-
- name: Release
39+
- name: Publish to GitHub Packages
40+
working-directory: ./packages/openbridge-webcomponents
5641
env:
57-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
58-
NPM_CONFIG_PROVENANCE: "true"
59-
run: npx semantic-release
42+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
run: npm publish --access=restricted --tag dev

0 commit comments

Comments
 (0)