Skip to content

Commit

Permalink
Publish canary if other workflows pass
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl committed May 30, 2022
1 parent ff66e6a commit 31a134b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 44 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,38 @@ jobs:
run: yarn test:integration:plugins --maxWorkers=50% --silent=false
env:
DB_PASSWORD: postgres
publish-canary:
needs: [unit-tests, integration-tests-api, integration-tests-plugins]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
with:
fetch-depth: 0

- name: Setup Node.js environment
uses: actions/setup-node@v2.4.1
with:
node-version: "14"
cache: "yarn"
registry-url: 'https://registry.npmjs.org'
- name: "Get Branch Name"
run: |
BRANCH_NAME="${GITHUB_HEAD_REF}"
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
- name: Format Version Name
run: |
VERSION_NAME=`echo ${{ env.BRANCH_NAME }} | sed "s/[/_]/-/g"`
echo "VERSION_NAME=${VERSION_NAME}" >> $GITHUB_ENV
- name: Authenticate with NPM
run: |
echo "@oliverjuhl:registry=http://registry.npmjs.org/" > .npmrc
echo "registry=http://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Canary
run: lerna publish --yes --canary --preid ${{ env.VERSION_NAME }} --force-publish="*"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44 changes: 0 additions & 44 deletions .github/workflows/publish-canary.yml

This file was deleted.

0 comments on commit 31a134b

Please sign in to comment.