Skip to content

Commit

Permalink
Add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
erwstout committed Aug 23, 2021
1 parent 6e5de5f commit 40af13b
Show file tree
Hide file tree
Showing 4 changed files with 3,397 additions and 61 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Next Release
on:
push:
branches:
- next
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install Yarn
run: npm install -g yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

# Post release workflow
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: next
- name: Merge next into develop
uses: everlytic/[email protected]
with:
github_token: ${{ secrets.PICKUP_GH_BOT }}
source_ref: ${{ github.ref }}
target_branch: "develop"
commit_message_template: "[Automated] Merged {source_ref} into target {target_branch}"
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install Yarn
run: npm install -g yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

# Post release workflow
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
- name: Merge master into develop
uses: everlytic/[email protected]
with:
github_token: ${{ secrets.PICKUP_GH_BOT }}
source_ref: ${{ github.ref }}
target_branch: "develop"
commit_message_template: "[Automated] Merged {source_ref} into target {target_branch}"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"devDependencies": {
"eslint": "^7.32.0",
"husky": "^7.0.1",
"prettier": "^2.3.2"
"prettier": "^2.3.2",
"semantic-release": "^17.4.5"
}
}
Loading

0 comments on commit 40af13b

Please sign in to comment.