-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add intitial versioning (#228)
- Loading branch information
Showing
7 changed files
with
99 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: build | ||
description: installs dependencies & generates a build | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
- name: install | ||
run: npm ci | ||
shell: bash | ||
|
||
- name: build | ||
run: npm run build | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Draft release | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: setup config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Release bot :robot:" | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
- name: install | ||
run: npm i -g standard-version | ||
|
||
# this ci will just generate the changelog in a pr | ||
- name: release | ||
run: | | ||
standard-version --message "chore(release): Release v%s :rocket: :tada:" --skip.tag | ||
git checkout -b release/${{ github.sha }} | ||
git push origin release/${{ github.sha }} | ||
- name: version | ||
id: version | ||
run: echo ::set-output name=VERSION::$(node -pe "require('./package.json').version") | ||
|
||
- uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
github.rest.pulls.create({ | ||
title: 'Release ${{ steps.version.outputs.VERSION }} :rocket: :tada:', | ||
body: 'Please review and refine the changelog carefully, before approving this pr.', | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
head: 'release/${{ github.sha }}', | ||
base: 'master' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Release | ||
|
||
concurrency: | ||
group: ${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- id: tag | ||
name: tag | ||
if: | | ||
github.ref == 'refs/heads/master' && | ||
contains(github.event.head_commit.message, 'chore(release)') | ||
run: | | ||
git tag v$(node -pe "require('./package.json').version") | ||
git push origin v$(node -pe "require('./package.json').version") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ web-report/ | |
.vscode | ||
yarn-error.log | ||
dist/ | ||
build/ | ||
/build | ||
.idea | ||
web-build | ||
yalc.lock | ||
|