ci: 测试自动发版
This commit is contained in:
parent
edaabd0b70
commit
9dd7d2873c
|
|
@ -1,9 +1,8 @@
|
||||||
name: Deploy preview
|
name: Deploy preview
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches:
|
types: [published]
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: Release pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
if: "! contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
- name: Check lint
|
||||||
|
run: yarn lint:strict
|
||||||
|
- name: Check unit test
|
||||||
|
run: yarn test:unit:ci
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Semantic Release
|
||||||
|
uses: cycjimmy/semantic-release-action@v2
|
||||||
|
with:
|
||||||
|
extra_plugins: |
|
||||||
|
@semantic-release/changelog@3.0.6
|
||||||
|
@semantic-release/git@7.0.18
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
# !TRICKY
|
||||||
|
# https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/td-p/38085
|
||||||
|
always_job:
|
||||||
|
name: Always run job
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Always run
|
||||||
|
run: echo "TRICKY run"
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
module.exports = {
|
||||||
|
branch: 'master',
|
||||||
|
plugins: [
|
||||||
|
'@semantic-release/commit-analyzer',
|
||||||
|
'@semantic-release/release-notes-generator',
|
||||||
|
[
|
||||||
|
'@semantic-release/changelog',
|
||||||
|
{
|
||||||
|
changelogFile: 'docs/CHANGELOG.md',
|
||||||
|
changelogTitle:
|
||||||
|
'# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines.'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
['@semantic-release/npm', { npmPublish: false }],
|
||||||
|
'@semantic-release/github',
|
||||||
|
[
|
||||||
|
'@semantic-release/git',
|
||||||
|
{
|
||||||
|
assets: ['docs/CHANGELOG.md', 'package.json']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue