fix: do not createanother PR for every release-please PR merged #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
data: ${{ toJson(steps.rp.outputs) }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: rp | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# target-branch: chore/my-please-release-testbranch | |
- name: echo values | |
run: | | |
echo "Release created: ${{ steps.rp.outputs.release_created }}" | |
echo "Release tag_name: ${{ steps.rp.outputs.tag_name }}" | |
echo "Release sha: ${{ steps.rp.outputs.sha }}" | |
release-values: | |
name: "Release values" | |
needs: [release-please] | |
runs-on: ubuntu-latest | |
steps: | |
- name: echo outputs | |
run: | | |
echo "Release created: ${{ needs.release-please.outputs.data.release_created }}" | |
echo "Releases created: ${{ needs.release-please.outputs.data.releases_created }}" | |
echo "Release sha: ${{ needs.release-please.outputs.data.sha }}" | |
build: | |
needs: [release-please] | |
name: Build and Test | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Cache turbo build setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Test | |
run: pnpm test | |
- name: PrePublish SDK | |
run: pnpm --filter @monerium/sdk pub:pre | |
# run: pnpm --filter @monerium/sdk publish --access public | |
if: ${{ needs.release-please.outputs.data['packages/sdk--release_created'] }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
- name: PrePublish React Provider | |
run: pnpm --filter @monerium/sdk-react-provider pub:pre | |
# run: pnpm --filter @monerium/sdk-react-provider publish --access public | |
if: ${{ needs.release-please.outputs.data['packages/sdk-react-provider--release_created'] }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |