Skip to content

Commit

Permalink
ci: Improve Publication Process
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Jul 23, 2022
1 parent 115804c commit 2d8a654
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
40 changes: 25 additions & 15 deletions .github/workflows/release-please.yml
Expand Up @@ -18,22 +18,32 @@ jobs:
with:
command: manifest

# The logic below handles the npm publication:
# - uses: actions/checkout@v3
# if: ${{ steps.release.outputs.release_created }}
# The logic below handles the publication:
- name: Checkout code
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v3
with:
ref: ${{ env.REF_BRANCH }}

# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version: 16
# registry-url: "https://registry.npmjs.org"
# if: ${{ steps.release.outputs.release_created }}
- name: Use Node.js
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
cache: yarn

# - run: npm ci
# if: ${{ steps.release.outputs.release_created }}
- name: Install / Build
if: ${{ steps.release.outputs.releases_created }}
run: |
yarn
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.PUBLISH_NPM}}
# if: ${{ steps.release.outputs.release_created }}
# Release Please has already incremented versions and published tags, so we just
# need to publish all unpublished versions to NPM here
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
- name: Publish to NPM
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: yarn lerna publish from-package --no-push --no-private --yes
# cspell:ignore noreply
8 changes: 7 additions & 1 deletion .github/workflows/update-dependencies.yml
Expand Up @@ -27,22 +27,28 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ env.REF_BRANCH }}

- uses: actions/setup-node@v3
with:
cache: yarn

- name: Update
run: |
yarn
yarn upgrade
- name: update package.json
run: |
npx package-json-dependency-updater -u
- name: Install
run: |
yarn
# Catch any new dictionaries and add them to the config.
- name: Update Release-Please packages
# Catch any new dictionaries and add them to the config.
run: ./scripts/gen-release-please-config.sh

- name: Lint
run: |
yarn lint
Expand Down

0 comments on commit 2d8a654

Please sign in to comment.