diff --git a/.github/actions/yarn-version/action.yml b/.github/actions/yarn-version/action.yml new file mode 100644 index 0000000..195845a --- /dev/null +++ b/.github/actions/yarn-version/action.yml @@ -0,0 +1,30 @@ +name: Update yarn version for release +description: | + Updates yarn version which automatically does a commit and this action tags + +inputs: + repository_dir: + description: 'Directory of repository to update' + required: true + skip_tag: + description: 'Skip git tag' + required: false + default: "false" + +runs: + using: composite + steps: + - name: Update yarn version and tag + shell: bash + working-directory: ${{ inputs.repository_dir }} + env: + SKIP_TAG: ${{ inputs.skip_tag }} + run: | + yarn install --frozen-lockfile + yarn config set version-git-tag false + yarn version --new-version $RELEASE + git commit --allow-empty -am "Update version to $RELEASE" + if [ "$SKIP_TAG" == "false" ]; then + echo "Tagging yarn version $RELEASE" + git tag $RELEASE + fi \ No newline at end of file diff --git a/.github/workflows/pass-complete-release.yml b/.github/workflows/pass-complete-release.yml index e476ca8..44dae70 100644 --- a/.github/workflows/pass-complete-release.yml +++ b/.github/workflows/pass-complete-release.yml @@ -217,7 +217,7 @@ jobs: - name: Set Release/commit/tag ~ pass-acceptance-testing if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }} - uses: ./main/.github/actions/node-version + uses: ./main/.github/actions/yarn-version with: repository_dir: combined/pass-acceptance-testing env: @@ -225,7 +225,7 @@ jobs: - name: Set Snapshot/commit ~ pass-acceptance-testing if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }} - uses: ./main/.github/actions/node-version + uses: ./main/.github/actions/yarn-version with: repository_dir: combined/pass-acceptance-testing skip_tag: "true"