Skip to content

Commit

Permalink
chore(ci): create nightly release workflow
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
KaelWD committed Feb 19, 2021
1 parent 4974d74 commit c7a93f7
Show file tree
Hide file tree
Showing 3 changed files with 376 additions and 5 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Nightly Release
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 1' # 0200 Monday UTC

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
fail-fast: false
matrix:
branch: ['master', 'dev', 'next']
include:
- branch: 'master'
tag: 'latest'
preid: 'prepatch'
- branch: 'dev'
tag: 'dev'
preid: 'preminor'
- branch: 'next'
tag: 'next'
preid: 'premajor'
env:
RELEASE_BRANCH: ${{ matrix.branch }}
RELEASE_TAG: ${{ matrix.tag }}
RELEASE_PREID: ${{ matrix.preid }}
steps:
- run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
- uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
- uses: actions/cache@v2
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
- run: yarn --frozen-lockfile --non-interactive
- run: yarn lerna version --conventional-commits --conventional-prerelease --no-push --no-commit-hooks --preid "$RELEASE_BRANCH-$(date +'%Y%m%d')" --yes
- run: yarn conventional-changelog -p angular --outfile ./packages/vuetify/CHANGELOG.md -r 2
- run: >-
node -e "fs.writeFileSync(
'./package.json',
JSON.stringify({ ...require('./package.json'), name: '@vuetify/nightly' }, null, 2)
)"
working-directory: ./packages/vuetify
- run: yarn lerna run build --scope @vuetify/nightly
- name: NPM Release
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_API_KEY:?}
npm publish ./packages/vuetify --tag $RELEASE_TAG --access public
env:
NPM_API_KEY: ${{ secrets.NPM_TOKEN }}
TAG_NAME: ${{ env.RELEASE_TAG }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@typescript-eslint/parser": "^4.5.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.0",
"conventional-changelog-cli": "^2.1.1",
"cross-env": "^7.0.2",
"cross-spawn": "^6.0.5",
"css-loader": "^3.1.0",
Expand Down
Loading

0 comments on commit c7a93f7

Please sign in to comment.