feat!: deprecate multiple encoding version support for configurable constants #9888
Workflow file for this run
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: "Lint PR" | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
validate-title: | |
name: Validate PR title | |
runs-on: ubuntu-latest | |
steps: | |
- uses: amannn/action-semantic-pull-request@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
types: | | |
feat | |
fix | |
chore | |
docs | |
ci | |
rc | |
validate-changeset: | |
name: Validate PR Changeset | |
if: startsWith(github.head_ref, 'changeset-release') != true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: CI Setup | |
uses: ./.github/actions/ci-setup | |
- name: Validate Changeset | |
run: pnpm changeset status --since=origin/${{ github.base_ref }} | |
- name: Validate Changeset Content | |
run: | | |
CHANGESET_FILE=$(git diff --diff-filter=A --name-only origin/${{ github.base_ref }} .changeset/*.md) | |
if [ -z "$CHANGESET_FILE" ]; then | |
# A PR doesn't have to have a changeset when packages aren't affected | |
# e.g. when a script is added in the scripts folder | |
exit 0 | |
fi | |
CHANGESET_CONTENT=$(cat $CHANGESET_FILE | tail -n1) | |
if [ "$CHANGESET_CONTENT" != "$PR_TITLE" ]; then | |
echo "Changeset content does not match PR title. Please update the changeset to match the PR title." | |
exit 1 | |
fi | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
- name: Validate that there are only patch changes | |
if: startsWith(github.base_ref, 'release/') | |
run: | | |
CHANGES=$(sed -n '/---/,/---/p' .changeset/*.md) | |
echo $CHANGES | grep -E 'patch' --silent && echo "Patch changes found." || (echo "No patch changes found." && exit 1) | |
echo $CHANGES | grep -E 'minor|major' --silent && echo "Old releases can only be patched; no minor and major versions allowed." && exit 1 || echo "No minor nor major changes." | |
- name: Validate that there was no release for the next patch version | |
if: startsWith(github.base_ref, 'release/') | |
run: | | |
pnpm changeset version | |
VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' packages/fuels/package.json) | |
git reset --hard | |
STATUS_CODE=$(curl -s -w '%{http_code}\n' "https://www.npmjs.com/package/fuels/v/$VERSION" | tail -n1) | |
if [[ $STATUS_CODE != 404 ]]; then | |
echo "Release for version $VERSION already exists or curl received an unexpected result (result is $STATUS_CODE). Exiting." | |
exit 1 | |
else | |
exit 0 | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |