Skip to content

Commit 45e9489

Browse files
committed
ci: update workflows to oscd-workflows
1 parent ef060c9 commit 45e9489

File tree

4 files changed

+30
-115
lines changed

4 files changed

+30
-115
lines changed

.github/actions/setup-node-env/action.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Continuous Deployment
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
ci-cd:
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
uses: OMICRONEnergyOSS/oscd-gh-workflows/.github/workflows/continuous-deployment.yml@main
13+
secrets:
14+
gh_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 7 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,17 @@
1-
name: Release
2-
1+
name: Release Please
32
on:
43
push:
54
branches:
65
- main
7-
workflow_dispatch:
86

97
jobs:
10-
release-please:
11-
runs-on: ubuntu-latest
12-
outputs:
13-
release_created: ${{ steps.release.outputs.release_created }}
8+
release:
149
permissions:
1510
contents: write
16-
pull-requests: write
1711
issues: write
18-
steps:
19-
- uses: googleapis/release-please-action@v4
20-
id: release
21-
with:
22-
token: ${{ secrets.GITHUB_TOKEN }}
23-
config-file: release-please-config.json
24-
manifest-file: .release-please-manifest.json
25-
26-
npm-publish:
27-
needs: release-please
28-
if: ${{ needs.release-please.outputs.release_created }}
29-
runs-on: ubuntu-latest
30-
permissions:
31-
contents: read
32-
id-token: write
33-
steps:
34-
- uses: actions/checkout@v4
35-
- name: Setup Node.js
36-
uses: actions/setup-node@v4
37-
with:
38-
node-version: '22'
39-
registry-url: 'https://registry.npmjs.org'
40-
cache: 'npm'
41-
- name: Install dependencies
42-
run: npm ci
43-
- name: Build the package
44-
run: npm run build
45-
- name: Publish to NPMJS.org
46-
run: npm publish --provenance --access public
47-
env:
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49-
50-
gh-pages:
51-
needs: release-please
52-
if: ${{ needs.release-please.outputs.release_created }}
53-
runs-on: ubuntu-latest
54-
permissions:
55-
contents: write
56-
pages: write
12+
pull-requests: write
5713
id-token: write
58-
59-
environment:
60-
name: github-pages
61-
url: ${{ steps.deployment.outputs.page_url }}
62-
steps:
63-
- uses: actions/checkout@v4
64-
65-
- name: Setup Node Environment
66-
run: npm ci
67-
68-
- name: Build plugin bundle
69-
run: npm run bundle
70-
71-
- name: Upload bundle
72-
uses: actions/upload-pages-artifact@v3
73-
with:
74-
path: ./dist
75-
76-
- name: Deploy to GitHub Pages
77-
id: deployment
78-
uses: actions/deploy-pages@v4
14+
uses: OMICRONEnergyOSS/oscd-gh-workflows/.github/workflows/release-please.yml@main
15+
secrets:
16+
npm_token: ${{ secrets.NPM_TOKEN }}
17+
gh_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
1-
name: Test
2-
on: [push, pull_request, workflow_dispatch]
1+
name: Unit Tests
2+
on:
3+
push:
4+
branches:
5+
- main
36

47
jobs:
58
test:
6-
runs-on: ubuntu-latest
7-
container:
8-
image: mcr.microsoft.com/playwright:v1.54.1-noble
9-
options: --user 1001
10-
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v4
13-
14-
- uses: ./.github/actions/setup-node-env
15-
16-
- name: Build
17-
run: npm run-script build
18-
19-
- name: Run unit tests
20-
run: npm run-script test
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
uses: OMICRONEnergyOSS/oscd-gh-workflows/.github/workflows/unit-tests.yml@main

0 commit comments

Comments
 (0)