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

Update complete release workflow for pnpm #1022

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build yarn module for release
name: Build package module for release
description: |
Build yarn module
Build package module

inputs:
repository_dir:
Expand All @@ -17,18 +17,22 @@ inputs:
runs:
using: composite
steps:
- name: Builds yarn module
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Builds 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
pnpm install --frozen-lockfile
if [ "$IS_DEV" == "true" ]; then
yarn run build:dev
pnpm run build:dev
else
yarn run build
pnpm run build
fi
yarn run build:docker
pnpm run build:docker
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Update yarn version for release
name: Update package version for release
description: |
Updates yarn version which automatically does a commit and this action tags
Updates package version which automatically does a commit and this action tags

inputs:
repository_dir:
Expand All @@ -14,17 +14,21 @@ inputs:
runs:
using: composite
steps:
- name: Update yarn version and tag
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Update 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
pnpm install --frozen-lockfile
pnpm config set version-git-tag false
pnpm version --new-version $RELEASE
git commit --allow-empty -am "Update version to $RELEASE"
if [ "$SKIP_TAG" == "false" ]; then
echo "Tagging yarn version $RELEASE"
echo "Tagging version $RELEASE"
git tag $RELEASE
fi
18 changes: 9 additions & 9 deletions .github/workflows/pass-complete-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ jobs:
git clone https://${{ secrets.JAVA_RELEASE_PAT }}@github.com/eclipse-pass/pass-acceptance-testing.git combined/pass-acceptance-testing
git clone https://${{ secrets.JAVA_RELEASE_PAT }}@github.com/eclipse-pass/pass-docker.git combined/pass-docker

- name: Setup Node & Yarn
uses: actions/setup-node@v3
- name: Setup Node & pnpm
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Login to GHCR
uses: docker/login-action@v2
Expand Down Expand Up @@ -166,15 +166,15 @@ jobs:

- name: Set Release/commit/tag ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
uses: ./main/.github/actions/node-version
with:
repository_dir: combined/pass-ui
env:
RELEASE: ${{ env.RELEASE }}

- name: Build Release pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-build
uses: ./main/.github/actions/node-build
with:
repository_dir: combined/pass-ui
env_path: ../pass-docker/.env
Expand All @@ -185,7 +185,7 @@ jobs:

- name: Set Snapshot/commit ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
uses: ./main/.github/actions/node-version
with:
repository_dir: combined/pass-ui
skip_tag: "true"
Expand All @@ -194,7 +194,7 @@ jobs:

- name: Build Snapshot pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-build
uses: ./main/.github/actions/node-build
with:
repository_dir: combined/pass-ui
env_path: ../pass-docker/.env
Expand All @@ -217,15 +217,15 @@ jobs:

- name: Set Release/commit/tag ~ pass-acceptance-testing
if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
uses: ./main/.github/actions/node-version
with:
repository_dir: combined/pass-acceptance-testing
env:
RELEASE: ${{ env.RELEASE }}

- name: Set Snapshot/commit ~ pass-acceptance-testing
if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }}
uses: ./main/.github/actions/yarn-version
uses: ./main/.github/actions/node-version
with:
repository_dir: combined/pass-acceptance-testing
skip_tag: "true"
Expand Down
Loading