bump gradle -> 8.10.2 (#68) #17
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: tag jactor-modules/web | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'web/**' | |
jobs: | |
tag: | |
name: Bump dev version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch current semantic version | |
id: current | |
run: | | |
git fetch --tags | |
CURRENT_SEMVER=$(git tag --sort=-v:refname -l "*-snapshot-web" | sed 's;-snapshot-web;;'| head -n 1) | |
echo ::set-output name=semver::$CURRENT_SEMVER | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: 21 | |
cache: gradle | |
- run: ./gradlew :web:assemble | |
- name: Fetch current major/minor release | |
id: version | |
run: | | |
MAJOR_MINOR=$(./gradlew :web:properties | grep version: | grep SNAPSHOT | awk '{print $2}' | sed 's;.x-SNAPSHOT;;') | |
echo ::set-output name=toPatch::$MAJOR_MINOR | |
- name: Create new semantic version | |
id: semver | |
run: | | |
.github/workflows/new-semver.main.kts majorMinor=$PATCH_MAJOR_MINOR_VERSION semantic=$CURRENT_SEMANTIC_VERSION | |
echo ::set-output name=new::$(cat newSemVer) | |
env: | |
CURRENT_SEMANTIC_VERSION: ${{ steps.current.outputs.semver }} | |
PATCH_MAJOR_MINOR_VERSION: ${{ steps.version.outputs.toPatch }} | |
- name: Fetch github event metadata | |
id: metadata | |
run: | | |
echo ::set-output name=email::$(jq .commits $GITHUB_EVENT_PATH | jq '.[].committer.email' | head -n 1) | |
echo ::set-output name=name::$(jq .commits $GITHUB_EVENT_PATH | jq '.[].author.name' | head -n 1) | |
- name: Tag new snapshot semantic version | |
run: | | |
git remote set-url origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
git config --global user.email "$AUTHOR_EMAIL" | |
git config --global user.name "$AUTHOR_NAME" | |
git tag -a "$SEMANTIC_VERSION_NEW-snapshot-web" -m "New snapshot tagged. Previous snapshot: $SEMANTIC_VERSION_CURRENT" | |
git push --tags | |
env: | |
AUTHOR_EMAIL: ${{ steps.metadata.outputs.email }} | |
AUTHOR_NAME: ${{ steps.metadata.outputs.name }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SEMANTIC_VERSION_CURRENT: ${{ steps.current.outputs.semver }} | |
SEMANTIC_VERSION_NEW: ${{ steps.semver.outputs.new }} |