Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update publish actions #204

Merged
merged 2 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/publish-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
required: false
default: ''
jobs:
build:
build-alpha:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -20,13 +20,11 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- run: npm install
- run: npm run build
- run: ./node_modules/.bin/lerna publish --canary --preid ${{ github.event.inputs.preid }} --registry https://npm.pkg.github.com --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_MOFOJED }}
6 changes: 2 additions & 4 deletions .github/workflows/publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
build:
build-nightly:
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
runs-on: ubuntu-latest
Expand All @@ -30,13 +30,11 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- run: npm install
- run: npm run build
- run: ./node_modules/.bin/lerna publish --canary --preid beta --dist-tag nightly --registry https://npm.pkg.github.com --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_MOFOJED }}
20 changes: 20 additions & 0 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Node.js Publish Packages
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
- uses: actions/setup-node@v2
with:
node-version: '12.x'
- run: npm install
- run: npm run build
- run: ./node_modules/.bin/lerna publish --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_MOFOJED }}