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

config workflows #24

Merged
merged 3 commits into from
Jul 24, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
- uses: actions/checkout@v4
- run: node -v
- run: sudo corepack enable
- run: pnpm install --no-frozen-lockfile
- run: pnpm check-branch
- run: pnpm install
- run: pnpm check-branch
32 changes: 32 additions & 0 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
workflow_dispatch:
push:
tags:
- '*'

name: publish-package

jobs:
publish-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: node -v
- run: sudo corepack enable
- run: pnpm install
- run: pnpm build
- id: get-package
run: |
package=$(echo ${{github.ref_name}} | cut -d'@' -f1)
dirname=$(find . -path ./node_modules -prune -o -name 'package.json' -exec grep -q -i "\"name\": \"@stack-spot/${package}\"" {} \; -print | rev | cut -d'/' -f2 | rev)
echo "dirname=$dirname" >> "$GITHUB_OUTPUT"
- run: |
cd packages/${{steps.get-package.outputs.dirname}}
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
17 changes: 17 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
push:
branches:
- main

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GIT_ORG_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
4 changes: 4 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"packages/cli": "1.1.1",
"packages/runtime": "1.4.0"
}
14 changes: 14 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"separate-pull-requests": true,
"include-component-in-tag": true,
"tag-separator": "@",
"packages": {
"packages/cli": {
"release-type": "node"
},
"packages/runtime": {
"release-type": "node"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}