Skip to content

Commit

Permalink
ci: fix Github release workflow steps
Browse files Browse the repository at this point in the history
ci: use from-package strategy
  • Loading branch information
dylankelly committed Aug 7, 2023
1 parent b59d4db commit 900a649
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
node-version: 18
cache: 'pnpm'
scope: '@dpc-sdp'
- name: Install Dependencies
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: pnpm install --frozen-lockfile
- name: Publish canary build to @next tag
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set access public
npm set //npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}
pnpm config set access public
pnpm release:publish-next --yes
Update_Reference:
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- test-release
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -23,11 +24,29 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.6.2
run_install: false
- name: Install Node
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
node-version: 18
cache: 'pnpm'
scope: '@dpc-sdp'
- name: Install Dependencies
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: pnpm install --frozen-lockfile
- name: Create changelog and GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run release:changelog
- name: Publish semantic release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set access public
npm set //npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}
pnpm release:publish --yes
pnpm config set access public
pnpm run release:publish --yes
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ripple",
"private": true,
"version": "2.0.0",
"version": "2.2.0",
"packageManager": "pnpm@8.6.2",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand All @@ -19,10 +19,10 @@
"preinstall": "npx only-allow pnpm",
"release": "pnpm release:version && pnpm release:changelog",
"release:version": "lerna version --force-publish --no-changelog --no-git-tag-version --no-push",
"release:changelog": "changelogen --bump && changelogen gh release",
"release:changelog": "changelogen --bump --release --push && changelogen gh release",
"release:publish-alpha": "lerna publish --canary minor --preid alpha --dist-tag alpha --force-publish",
"release:publish-next": "lerna publish --canary minor --preid next --dist-tag next --force-publish",
"release:publish": "lerna publish from-git",
"release:publish": "lerna publish from-package",
"lint": "eslint . --ext .ts,.vue && stylelint 'packages/ripple-ui-core/**/*.css'",
"test:unit": "jest --colors --runInBand",
"test:components-core": "pnpm -F @dpc-sdp/ripple-ui-core test:components",
Expand Down

0 comments on commit 900a649

Please sign in to comment.