Skip to content

chore(release): node-resolve v15.2.0 #390

chore(release): node-resolve v15.2.0

chore(release): node-resolve v15.2.0 #390

Workflow file for this run

name: Release Packages
on:
push:
branches:
- master
jobs:
publish:
# let's ignore release commits, otherwise it'll try to run twice
if: |
!startsWith(github.event.head_commit.message , 'chore(release):') &&
!startsWith(github.event.head_commit.message , 'chore(repo):')
runs-on: ubuntu-latest
name: release
steps:
- name: Checkout Commit
uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Checkout Master
run: |
git branch -f master origin/master
git checkout master
- name: Sanity Check
run: |
echo branch `git branch --show-current`;
echo node `node -v`;
- name: Initliaze .npmrc
run: >
echo -e "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}\n$(cat .npmrc)" > .npmrc
&& cat -n .npmrc
- name: Install pnpm
run: |
npm install pnpm@7 -g;
echo node `pnpm -v`;
- name: Set Git Config
run: |
git config pull.rebase false
git config --global user.email "[email protected]"
git config --global user.name "Release Workflow"
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
- name: pnpm install
run: pnpm install
- name: Build Packages
run: pnpm --recursive build
- name: Lint Monorepo
run: pnpm lint
- name: Run Tests
run: pnpm --filter [HEAD^] test
- name: Release and Publish Packages
run: pnpm --filter [HEAD^] --workspace-concurrency=1 release
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push Release and Cleanup
run: |
pnpm lint:docs
git checkout .npmrc
git add . && git commit --amend --no-edit
git pull origin master --no-edit
git rebase
git push origin HEAD:master
git push origin HEAD:master --tags