Skip to content

Commit

Permalink
CI: Automate release
Browse files Browse the repository at this point in the history
  • Loading branch information
zeppelin committed Jul 18, 2022
1 parent bfe0132 commit e357a58
Show file tree
Hide file tree
Showing 6 changed files with 1,507 additions and 66 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
// node files
{
files: [
'.release-it.js',
'ember-cli-build.js',
'index.js',
'testem.js',
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ on:
push:
branches:
- master
- 'v*'
pull_request:

env:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
name: release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'

- run: yarn install
- run: yarn build

- name: auto-dist-tag
run: npx auto-dist-tag@1 --write

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 19 additions & 0 deletions .release-it.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
plugins: {
'release-it-lerna-changelog': {
infile: 'CHANGELOG.md',
},
},
git: {
commitMessage: 'v${version}',
tagName: 'v${version}',
},
github: {
release: true,
releaseName: 'Release ${version}',
tokenRef: 'GITHUB_AUTH',
},
npm: {
publish: false,
},
};
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"release": "release-it",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test:ember": "ember test",
Expand Down Expand Up @@ -73,6 +74,8 @@
"prettier": "^1.18.2",
"qunit": "^2.19.1",
"qunit-dom": "^1.6.0",
"release-it": "^14.12.4",
"release-it-lerna-changelog": "^4.0.1",
"webpack": "^5.73.0"
},
"engines": {
Expand Down
Loading

0 comments on commit e357a58

Please sign in to comment.