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

add version to changeset release preview pr #13032

Merged
merged 9 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions .changeset/pink-sloths-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Test changeset release preview PR with version title
28 changes: 27 additions & 1 deletion .github/workflows/cicd-changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ on:
push:
branches:
- develop
- re-2553/add-version-release-preview-pr # remove after testing

jobs:
cicd-changesets:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
users: read
statuses: read
momentmaker marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand All @@ -28,6 +31,29 @@ jobs:
core-changeset:
- added: '.changeset/**'

- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
if: steps.changeset-added.outputs.core-changeset == 'true'
with:
version: ^8.0.0

- name: Setup node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
if: steps.changeset-added.outputs.core-changeset == 'true'
with:
node-version: 20
cache: pnpm
cache-dependency-path: ./pnpm-lock.yaml

- name: Run changeset version
run: pnpm install && pnpm changeset version
if: steps.changeset-added.outputs.core-changeset == 'true'

- name: Get release version
if: steps.changeset-added.outputs.core-changeset == 'true'
id: get-release-version
run: VERSION=$(jq -r '.version' package.json) >> $GITHUB_OUTPUT

- name: cicd-changesets
if: steps.changeset-added.outputs.core-changeset == 'true'
uses: smartcontractkit/.github/actions/cicd-changesets@6da79c7b9f14bec077df2c1ad40d53823b409d9c # [email protected]
Expand All @@ -37,7 +63,7 @@ jobs:
git-email: app-token-issuer-releng[bot]@users.noreply.github.com
pnpm-use-cache: false
pr-draft: true
pr-title: "[DO NOT MERGE] Release Preview - Changeset"
pr-title: "[DO NOT MERGE] Changeset Release Preview - v${{ steps.get-release-version.outputs.VERSION }}"
# aws inputs
aws-region: ${{ secrets.AWS_REGION }}
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_CI_AUTO_PR_TOKEN_ISSUER_ROLE_ARN }}
Expand Down
Loading