Skip to content

Commit

Permalink
feat: [ODIN-439] added standard-version module to generate changelog …
Browse files Browse the repository at this point in the history
…and bump versions (#63)
  • Loading branch information
rprovodenko authored Dec 16, 2020
1 parent ca93503 commit 33fc162
Show file tree
Hide file tree
Showing 4 changed files with 1,037 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
titleOnly: true
63 changes: 63 additions & 0 deletions .github/workflows/auto-release.yml
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"cmake-js": "^6.1.0",
"node-addon-api": "^3.0.2",
"prebuild-install": "^6.0.0",
"rimraf": "^3.0.2"
"rimraf": "^3.0.2",
"standard-version": "^9.0.0"
},
"devDependencies": {
"@microsoft/api-documenter": "^7.11.3",
Expand Down
Loading

0 comments on commit 33fc162

Please sign in to comment.