Skip to content

Commit

Permalink
Add next dev tag to snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoet-jh committed May 16, 2024
1 parent ea79ca0 commit f6d9991
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 27 deletions.
11 changes: 2 additions & 9 deletions .github/actions/yarn-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ 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 }}
- name: Update yarn version and tag
shell: bash
working-directory: ${{ inputs.repository_dir }}
env:
Expand All @@ -24,7 +20,4 @@ runs:
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
git tag --force $RELEASE_TAG
40 changes: 22 additions & 18 deletions .github/workflows/pass-complete-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
env:
RELEASE: ${{ inputs.releaseversion }}
NEXT: ${{ inputs.nextversion }}
NEXT_TAG: ${{ inputs.nextversion }}-init
steps:
- name: Checkout main
uses: actions/checkout@v4
Expand Down Expand Up @@ -119,9 +120,9 @@ jobs:
- name: Push the Release commits and tags ~ Java Repositories
if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }}
run: |
(cd main && git push origin && git push origin --force --tags)
(cd combined/pass-core && git push origin && git push origin --force --tags)
(cd combined/pass-support && git push origin && git push origin --force --tags)
(cd main && git push --atomic origin --force $RELEASE)
(cd combined/pass-core && git push --atomic origin --force $RELEASE)
(cd combined/pass-support && git push --atomic origin --force $RELEASE)
- name: Create GitHub main release ~ Java Repositories
if: ${{ ! env.ALL_JAVA_REPOS_TAG_EXISTS }}
Expand All @@ -142,6 +143,7 @@ jobs:
repository_dir: combined/pass-ui
env:
RELEASE: ${{ env.RELEASE }}
RELEASE_TAG: ${{ env.RELEASE }}

- name: Build Release pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
Expand All @@ -156,7 +158,7 @@ jobs:

- name: Push the Release commits and tags ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
run: cd combined/pass-ui && git push origin && git push origin --tags
run: cd combined/pass-ui && git push --atomic origin --force $RELEASE

- name: Create GitHub main release ~ pass-ui
if: ${{ ! env.PASS_UI_TAG_EXISTS }}
Expand All @@ -171,10 +173,11 @@ jobs:
repository_dir: combined/pass-acceptance-testing
env:
RELEASE: ${{ env.RELEASE }}
RELEASE_TAG: ${{ env.RELEASE }}

- name: Push the Release commits and tags ~ pass-acceptance-testing
if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }}
run: cd combined/pass-acceptance-testing && git push origin && git push origin --tags
run: cd combined/pass-acceptance-testing && git push --atomic origin --force $RELEASE

- name: Create GitHub main release ~ pass-acceptance-testing
if: ${{ ! env.PASS_ACCPT_TEST_TAG_EXISTS }}
Expand All @@ -188,7 +191,7 @@ jobs:
cd combined/pass-docker
sed -i "/^PASS_VERSION/s/.*/PASS_VERSION=$RELEASE/" .env
git commit --allow-empty -am "Update version to $RELEASE"
git tag $RELEASE
git tag --force $RELEASE
- name: Build Release pass-docker images
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
Expand All @@ -203,7 +206,7 @@ jobs:
- name: Push the Release commits and tags ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
run: cd combined/pass-docker && git push origin && git push origin --tags
run: cd combined/pass-docker && git push --atomic origin --force $RELEASE

- name: Create GitHub main release ~ pass-docker
if: ${{ ! env.PASS_DOCKER_TAG_EXISTS }}
Expand All @@ -213,10 +216,10 @@ jobs:

- name: Set Snapshot/commit ~ Java Repositories
run: |
(cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit --allow-empty -am "Update version to $NEXT")
(cd main && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT && git commit --allow-empty -am "Update version to $NEXT" && git tag --force $NEXT_TAG)
(cd combined && mvn versions:set -B -ntp -DallowSnapshots=true -DnewVersion=$NEXT)
(cd combined/pass-core && git commit --allow-empty -am "Update version to $NEXT")
(cd combined/pass-support && git commit --allow-empty -am "Update version to $NEXT")
(cd combined/pass-core && git commit --allow-empty -am "Update version to $NEXT" && git tag --force $NEXT_TAG)
(cd combined/pass-support && git commit --allow-empty -am "Update version to $NEXT" && git tag --force $NEXT_TAG)
- name: Release Snapshot Java modules
working-directory: combined
Expand All @@ -238,17 +241,17 @@ jobs:
- name: Push the Snapshot commits ~ Java Repositories
run: |
(cd main && git push origin)
(cd combined/pass-core && git push origin)
(cd combined/pass-support && git push origin)
(cd main && git push --atomic origin --force $NEXT_TAG)
(cd combined/pass-core && git push --atomic origin --force $NEXT_TAG)
(cd combined/pass-support && git push --atomic origin --force $NEXT_TAG)
- name: Set Snapshot/commit ~ pass-ui
uses: ./main/.github/actions/yarn-version
with:
repository_dir: combined/pass-ui
skip_tag: "true"
env:
RELEASE: ${{ env.NEXT }}
RELEASE_TAG: ${{ env.NEXT_TAG }}

- name: Build Snapshot pass-ui
uses: ./main/.github/actions/yarn-build
Expand All @@ -261,24 +264,25 @@ jobs:
run: docker push ghcr.io/eclipse-pass/pass-ui:$NEXT

- name: Push the Snapshot commits ~ pass-ui
run: cd combined/pass-ui && git push origin
run: cd combined/pass-ui && git push --atomic origin --force $NEXT_TAG

- name: Set Snapshot/commit ~ pass-acceptance-testing
uses: ./main/.github/actions/yarn-version
with:
repository_dir: combined/pass-acceptance-testing
skip_tag: "true"
env:
RELEASE: ${{ env.NEXT }}
RELEASE_TAG: ${{ env.NEXT_TAG }}

- name: Push the Snapshot commits ~ pass-acceptance-testing
run: cd combined/pass-acceptance-testing && git push origin
run: cd combined/pass-acceptance-testing && git push --atomic origin --force $NEXT_TAG

- name: Set Snapshot/commit ~ pass-docker
run: |
cd combined/pass-docker
sed -i "/^PASS_VERSION/s/.*/PASS_VERSION=$NEXT/" .env
git commit --allow-empty -am "Update version to $NEXT"
git tag --force $NEXT_TAG
- name: Build Snapshot pass-docker images
working-directory: combined/pass-docker
Expand All @@ -290,4 +294,4 @@ jobs:
docker push ghcr.io/eclipse-pass/idp:$NEXT
- name: Push the Snapshot commits ~ pass-docker
run: cd combined/pass-docker && git push origin
run: cd combined/pass-docker && git push --atomic origin --force $NEXT_TAG

0 comments on commit f6d9991

Please sign in to comment.