Skip to content

Commit

Permalink
feat: add release-please config and manifest, run existing workflows …
Browse files Browse the repository at this point in the history
…through release-please
  • Loading branch information
bass-dandy committed Jun 18, 2023
1 parent de4e4e7 commit fcaa874
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 57 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/gh-pages.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/npm-publish.yml

This file was deleted.

44 changes: 42 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,45 @@ jobs:
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: release-please-action
command: manifest

# build if release was created
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.releases_created }}
- name: Setup node
uses: actions/setup-node@v3
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: '18.15.0'
registry-url: 'https://registry.npmjs.org'
- name: Set up pnpm
uses: pnpm/action-setup@v2
if: ${{ steps.release.outputs.releases_created }}
with:
version: 8.1.0
run_install: |
- recursive: true
args: [--frozen-lockfile]
# build and deploy gh pages for simpai release
- run: pnpm build
if: ${{ steps.release.outputs['packages/simpai--release-created'] }}
- name: Deploy
if: ${{ steps.release.outputs['packages/simpai--release-created'] }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/simpai/build

# build and publish npm package for other releases
- name: Get package name
if: ${{ steps.release.outputs.releases_created && !steps.release.outputs['packages/simpai--release-created'] }}
run: |
tag_name="${{ steps.release.outputs.tag_name }}"
words=($tag_name)
package_to_publish=${words[0]}
echo "package_to_publish=${package_to_publish}" >> $GITHUB_ENV
- run: pnpm --filter "${{ env.package_to_publish }}" publish --no-git-checks
if: ${{ steps.release.outputs.releases_created && !steps.release.outputs['packages/simpai--release-created'] }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/dbpf-transform": "0.0.3"
}
10 changes: 10 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packages": {
"packages/dbpf-transform": {},
"packages/simpai": {}
},
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"separate-pull-requests": true,
"tag-separator": " "
}

0 comments on commit fcaa874

Please sign in to comment.