Skip to content

Commit

Permalink
ci: add prerelease workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cadgerfeast committed Nov 21, 2024
1 parent e5631fc commit 1b08848
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'chore: release')"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'chore: release')"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Prerelease

on:
workflow_dispatch:

jobs:
prerelease:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.13.0'
registry-url: 'https://registry.npmjs.org'
- name: Setup Git
run: |
git config --global user.email "action@github.com"
git config --global user.name "Github Action"
- name: Setup NPM
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install
run: npm ci
- name: Build
run: npm run build -- --projects vertis
- name: Version
run: npm run version:prerelease
- name: Publish
run: npm run publish:prerelease
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.nx/
/node_modules
/.npmrc
5 changes: 3 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"publish": {
"private": false,
"yes": true
"yes": true,
"preid": "alpha"
}
}
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"shared/*"
],
"scripts": {
"prepare": "husky install && npm run build",
"prepare": "husky install",
"commit": "cz",
"commitlint": "commitlint --edit",
"dev": "nx run-many -t dev --output-style=stream",
Expand All @@ -17,8 +17,10 @@
"preview": "nx preview docs",
"exec": "node ./packages/vertis/cli.js",
"version": "lerna version",
"version:prerelease": "lerna version --conventional-prerelease --no-git-tag-version",
"changelog": "vertis generate",
"publish": "lerna publish from-package",
"publish:prerelease": "lerna publish from-package --canary --no-git-tag-version --no-push",
"release": "vertis release"
},
"devDependencies": {
Expand Down

0 comments on commit 1b08848

Please sign in to comment.