Skip to content

Commit

Permalink
Squash commit: Finish complete release workflow
Browse files Browse the repository at this point in the history
Adds one workflow to release all PASS modules and set the next
snapshot version.
  • Loading branch information
rpoet-jh committed May 16, 2024
1 parent 63d6f7a commit ea79ca0
Show file tree
Hide file tree
Showing 3 changed files with 289 additions and 87 deletions.
34 changes: 34 additions & 0 deletions .github/actions/yarn-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build yarn module for release
description: |
Build yarn module
inputs:
repository_dir:
description: 'Directory of repository to build'
required: true
env_path:
description: 'Path to .env file'
required: true
is_dev:
description: 'Is dev build'
required: false
default: "false"

runs:
using: composite
steps:
- name: Builds yarn module
shell: bash
working-directory: ${{ inputs.repository_dir }}
env:
ENV_FILE_PATH: ${{ inputs.env_path }}
IS_DEV: ${{ inputs.is_dev }}
run: |
export $(grep -v '^[#|SIGNING|PASS_CORE_POLICY]' $ENV_FILE_PATH | xargs -d '\n')
yarn install --frozen-lockfile
if [ "$IS_DEV" == "true" ]; then
yarn run build:dev
else
yarn run build
fi
yarn run build:docker
30 changes: 30 additions & 0 deletions .github/actions/yarn-version/action.yml
Original file line number Diff line number Diff line change
@@ -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 ${{ env.RELEASE }}
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
Loading

0 comments on commit ea79ca0

Please sign in to comment.