-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [ODIN-439] added standard-version module to generate changelog …
…and bump versions (#63)
- Loading branch information
1 parent
ca93503
commit 33fc162
Showing
4 changed files
with
1,037 additions
and
30 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 @@ | ||
titleOnly: true |
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,63 @@ | ||
name: Release | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout master | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: master | ||
token: ${{secrets.BRANCH_PROTECTION_TOKEN}} | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: "@deepcrawl" | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Restore keys from cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Temporarily disable "include administrators" branch protection | ||
uses: benjefferies/branch-protection-bot@master | ||
if: always() | ||
with: | ||
access-token: ${{ secrets.BRANCH_PROTECTION_TOKEN }} | ||
enforce_admins: false | ||
branch: master | ||
- name: Install modules with frozen lockfile and build | ||
run: | | ||
echo -e "always-auth=true\n//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | ||
cat ~/.npmrc | ||
yarn config set username $USERNAME | ||
yarn config set email $EMAIL | ||
yarn config set version-git-message "Release: v%s" | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
yarn install --frozen-lockfile | ||
yarn standard-version | ||
git push -f | ||
yarn publish --tag provisional-release --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
GITHUB_TOKEN: ${{ secrets.UPLOAD_ARTIFACTS_TOKEN }} | ||
USERNAME: ${{secrets.USERNAME}} | ||
EMAIL: ${{secrets.EMAIL}} | ||
GH_TOKEN: ${{secrets.BRANCH_PROTECTION_TOKEN}} | ||
- name: Enable "include administrators" branch protection | ||
uses: benjefferies/branch-protection-bot@master | ||
if: always() # Force to always run this step to ensure "include administrators" is always turned back on | ||
with: | ||
access-token: ${{ secrets.BRANCH_PROTECTION_TOKEN }} | ||
enforce_admins: true | ||
branch: 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
Oops, something went wrong.