patch(deps): Update a few transitive dependencies #847
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: actions | |
on: | |
push: | |
paths-ignore: | |
- README.md | |
- LICENSE.md | |
- 'docs/**' | |
- '.github/workflows/codeql-analysis.yaml' | |
- '.github/workflows/devcontainer-ci.yaml' | |
- '.github/dependabot.yaml' | |
- '.gitignore' | |
branches: | |
- root | |
pull_request: | |
paths-ignore: | |
- README.md | |
- LICENSE.md | |
- 'docs/**' | |
- '.github/workflows/codeql-analysis.yaml' | |
- '.github/workflows/devcontainer-ci.yaml' | |
- '.github/dependabot.yaml' | |
- '.gitignore' | |
workflow_dispatch: | |
jobs: | |
initial-build: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "Starting build pipeline for jjversion." | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- run: git log --oneline | |
- run: ls -al | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 | |
with: | |
go-version: '1.21.0' | |
- run: go vet | |
- run: go test ./... | |
- run: go build -a -v -o jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: jjversion | |
- run: echo "VERSION=$(jjversion | jq --raw-output '.MajorMinorPatch')" >> $GITHUB_ENV | |
- run: sudo rm /usr/local/bin/jjversion | |
- run: go build -a -v -o jjversion -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- run: sudo cp jjversion /usr/local/bin | |
- run: jjversion | |
- run: jjversion --version | |
- run: jjversion --help | |
- name: Upload jjversion | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion | |
path: jjversion | |
docker-build: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- name: Setup Docker BuildKit | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: jjversion | |
- run: echo "VERSION=$(jjversion | jq --raw-output '.MajorMinorPatch')" >> $GITHUB_ENV | |
- run: | | |
docker build -t jjliggett/jjversion . \ | |
--build-arg BUILD_VERSION="${{ env.VERSION }}" \ | |
--label "org.opencontainers.image.created=$(date +%Y-%m-%dT%H:%M:%S%z)" \ | |
--label "org.opencontainers.image.version=${{ env.VERSION }}" \ | |
--label "org.opencontainers.image.authors=jjliggett" \ | |
--label "org.opencontainers.image.url=https://github.com/jjliggett/jjversion" \ | |
--label "org.opencontainers.image.documentation=https://github.com/jjliggett/jjversion" \ | |
--label "org.opencontainers.image.source=https://github.com/jjliggett/jjversion" \ | |
--label "org.opencontainers.image.revision=$(git rev-parse HEAD)" \ | |
--label "org.opencontainers.image.title=jjversion" \ | |
--label "org.opencontainers.image.description=A basic versioning utility to version git projects" | |
- run: docker inspect jjliggett/jjversion | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | |
- run: docker run --rm jjliggett/jjversion jjversion --version | |
- run: docker save jjliggett/jjversion > jjversion.tar | |
- name: Upload jjversion.tar | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion.tar | |
path: jjversion.tar | |
docker-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- name: Setup Docker BuildKit | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 | |
- run: docker build -f Dockerfile.test -t jjliggett/jjversion-test . | |
- run: docker run --rm jjliggett/jjversion-test | |
- run: make test | |
build-cross-compilation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 | |
with: | |
go-version: '1.21.0' | |
- run: go install | |
- run: go build -a -v -o jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: jjversion | |
- run: echo "VERSION=$(jjversion | jq --raw-output '.MajorMinorPatch')" >> $GITHUB_ENV | |
- run: echo "MAJOR=$(jjversion | jq --raw-output '.Major')" >> $GITHUB_ENV | |
- run: echo "MINOR=$(jjversion | jq --raw-output '.Minor')" >> $GITHUB_ENV | |
- run: echo "PATCH=$(jjversion | jq --raw-output '.Patch')" >> $GITHUB_ENV | |
- run: go build -a -v -o jjversion-${{ env.VERSION }}-linux-x64/jjversion -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- run: env GOARCH=arm64 go build -a -v -o jjversion-${{ env.VERSION }}-linux-arm64/jjversion -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- run: env GOARCH=arm go build -a -v -o jjversion-${{ env.VERSION }}-linux-arm/jjversion -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- run: env GOARCH=386 go build -a -v -o jjversion-${{ env.VERSION }}-linux-386/jjversion -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- run: env GOOS=darwin GOARCH=amd64 go build -a -v -o jjversion-${{ env.VERSION }}-darwin-amd64/jjversion -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
# Set goversioninfo configuration for version and build Windows executables | |
- name: Change goversioninfo in jjversion.go | |
run: sed -i "s/\/\/go:generate goversioninfo/\/\/go:generate goversioninfo -file-version=${{ env.VERSION }} -product-version=${{ env.VERSION }} -ver-major=${{ env.MAJOR }} -ver-minor=${{ env.MINOR }} -ver-patch=${{ env.PATCH }} -ver-build=0 -product-ver-major=${{ env.MAJOR }} -product-ver-minor=${{ env.MINOR }} -product-ver-patch=${{ env.PATCH }} -product-ver-build=0/g" jjversion.go | |
- run: echo $PATH | |
- run: go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest | |
- run: go env | |
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#adding-a-system-path | |
- run: echo "/home/runner/go/bin" >> $GITHUB_PATH | |
- run: echo $PATH | |
- run: go generate | |
- run: env GOOS=windows GOARCH=386 go build -a -v -o jjversion-${{ env.VERSION }}-windows-386/jjversion.exe -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- run: env GOOS=windows GOARCH=amd64 go build -a -v -o jjversion-${{ env.VERSION }}-windows-x64/jjversion.exe -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- run: rm resource.syso | |
- run: env GOOS=windows GOARCH=arm go build -a -v -o jjversion-${{ env.VERSION }}-windows-arm/jjversion.exe -ldflags "-X main.appVersion=${{ env.VERSION }}" | |
- name: Upload jjversion docs | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-docs | |
path: docs/ | |
- name: Upload jjversion linux x64 | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-x64 | |
path: jjversion-${{ env.VERSION }}-linux-x64/ | |
- name: Upload jjversion linux arm64 | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-arm64 | |
path: jjversion-${{ env.VERSION }}-linux-arm64/ | |
- name: Upload jjversion linux arm | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-arm | |
path: jjversion-${{ env.VERSION }}-linux-arm/ | |
- name: Upload jjversion linux 386 | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-386 | |
path: jjversion-${{ env.VERSION }}-linux-386/ | |
- name: Upload jjversion darwin amd64 | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-darwin-amd64 | |
path: jjversion-${{ env.VERSION }}-darwin-amd64/ | |
- name: Upload jjversion windows x64 | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-windows-x64 | |
path: jjversion-${{ env.VERSION }}-windows-x64/ | |
- name: Upload jjversion windows 386 | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-windows-386 | |
path: jjversion-${{ env.VERSION }}-windows-386/ | |
- name: Upload jjversion windows arm | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-windows-arm | |
path: jjversion-${{ env.VERSION }}-windows-arm/ | |
publish: | |
runs-on: ubuntu-latest | |
needs: | |
- initial-build | |
- docker-build | |
- docker-test | |
- test-release-branch | |
- test-release-branch-and-tag | |
- test-commit-incrementing | |
- test-commit-tags-annotated-highest | |
- test-commit-tags-lightweight-highest | |
- test-docker-release-branch | |
- test-docker-release-branch-and-tag | |
- test-docker-commit-incrementing | |
- test-docker-commit-tags-annotated-highest | |
- test-docker-commit-tags-lightweight-highest | |
- test-commit-incrementing-custom-versioning-settings | |
- test-commit-incrementing-no-settings | |
- build-cross-compilation | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: jjversion | |
- run: echo "VERSION=$(jjversion | jq --raw-output '.MajorMinorPatch')" >> $GITHUB_ENV | |
- run: git reset --soft HEAD~1 | |
- run: echo "PREVIOUS_COMMIT_VERSION=$(jjversion | jq --raw-output '.MajorMinorPatch')" >> $GITHUB_ENV | |
- name: Download jjversion linux x64 | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-x64 | |
path: jjversion-${{ env.VERSION }}-linux-x64/ | |
- name: Download jjversion linux arm64 | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-arm64 | |
path: jjversion-${{ env.VERSION }}-linux-arm64/ | |
- name: Download jjversion linux arm | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-arm | |
path: jjversion-${{ env.VERSION }}-linux-arm/ | |
- name: Download jjversion linux 386 | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-linux-386 | |
path: jjversion-${{ env.VERSION }}-linux-386/ | |
- name: Download jjversion darwin amd64 | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-darwin-amd64 | |
path: jjversion-${{ env.VERSION }}-darwin-amd64/ | |
- name: Download jjversion windows x64 | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-windows-x64 | |
path: jjversion-${{ env.VERSION }}-windows-x64/ | |
- name: Download jjversion windows 386 | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-windows-386 | |
path: jjversion-${{ env.VERSION }}-windows-386/ | |
- name: Download jjversion windows arm | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-windows-arm | |
path: jjversion-${{ env.VERSION }}-windows-arm/ | |
# Prepare directories - copy README.md, LICENSE.md, and docs (attributions) | |
- run: cp README.md jjversion-${{ env.VERSION }}-linux-x64/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-linux-x64/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-linux-x64/jjversion-docs | |
- run: cp README.md jjversion-${{ env.VERSION }}-linux-arm64/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-linux-arm64/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-linux-arm64/jjversion-docs | |
- run: cp README.md jjversion-${{ env.VERSION }}-linux-arm/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-linux-arm/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-linux-arm/jjversion-docs | |
- run: cp README.md jjversion-${{ env.VERSION }}-linux-386/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-linux-386/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-linux-386/jjversion-docs | |
- run: cp README.md jjversion-${{ env.VERSION }}-darwin-amd64/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-darwin-amd64/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-darwin-amd64/jjversion-docs | |
- run: cp README.md jjversion-${{ env.VERSION }}-windows-x64/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-windows-x64/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-windows-x64/jjversion-docs | |
- run: cp README.md jjversion-${{ env.VERSION }}-windows-386/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-windows-386/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-windows-386/jjversion-docs | |
- run: cp README.md jjversion-${{ env.VERSION }}-windows-arm/jjversion-README.md | |
- run: cp LICENSE.md jjversion-${{ env.VERSION }}-windows-arm/jjversion-LICENSE.md | |
- run: cp -R docs jjversion-${{ env.VERSION }}-windows-arm/jjversion-docs | |
- run: zip -r jjversion-${{ env.VERSION }}-docs.zip docs | |
- run: zip -r jjversion-${{ env.VERSION }}-linux-x64.zip jjversion-${{ env.VERSION }}-linux-x64 | |
- run: zip -r jjversion-${{ env.VERSION }}-linux-arm64.zip jjversion-${{ env.VERSION }}-linux-arm64 | |
- run: zip -r jjversion-${{ env.VERSION }}-linux-arm.zip jjversion-${{ env.VERSION }}-linux-arm | |
- run: zip -r jjversion-${{ env.VERSION }}-linux-386.zip jjversion-${{ env.VERSION }}-linux-386 | |
- run: zip -r jjversion-${{ env.VERSION }}-darwin-amd64.zip jjversion-${{ env.VERSION }}-darwin-amd64 | |
- run: zip -r jjversion-${{ env.VERSION }}-windows-x64.zip jjversion-${{ env.VERSION }}-windows-x64 | |
- run: zip -r jjversion-${{ env.VERSION }}-windows-386.zip jjversion-${{ env.VERSION }}-windows-386 | |
- run: zip -r jjversion-${{ env.VERSION }}-windows-arm.zip jjversion-${{ env.VERSION }}-windows-arm | |
- run: zip jjversion-${{ env.VERSION }}-artifacts.zip jjversion-${{ env.VERSION }}-linux-x64.zip jjversion-${{ env.VERSION }}-linux-arm64.zip jjversion-${{ env.VERSION }}-linux-arm.zip jjversion-${{ env.VERSION }}-linux-386.zip jjversion-${{ env.VERSION }}-darwin-amd64.zip jjversion-${{ env.VERSION }}-windows-x64.zip jjversion-${{ env.VERSION }}-windows-386.zip jjversion-${{ env.VERSION }}-windows-arm.zip | |
- run: ls -R | |
- name: Upload jjversion | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
name: jjversion-${{ env.VERSION }}-artifacts.zip | |
path: jjversion-${{ env.VERSION }}-artifacts.zip | |
- name: Download jjversion.tar | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion.tar | |
- run: docker load < jjversion.tar | |
- run: docker tag jjliggett/jjversion "jjliggett/jjversion:${{ env.VERSION }}" | |
- run: docker tag jjliggett/jjversion "ghcr.io/jjliggett/jjversion:${{ env.VERSION }}" | |
- run: docker tag jjliggett/jjversion "ghcr.io/jjliggett/jjversion:latest" | |
- run: docker images | |
- run: echo "The Docker image with this version has not been published yet. The image will be uploaded on the root branch." | |
if: ${{ env.VERSION != env.PREVIOUS_COMMIT_VERSION }} | |
- run: echo "The Docker image with this version has already been published. The image will not be uploaded on the root branch." | |
if: ${{ env.VERSION == env.PREVIOUS_COMMIT_VERSION }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | |
if: ${{ github.ref == 'refs/heads/root' }} | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GH_PUBLISH_TOKEN }} | |
- run: docker push "ghcr.io/jjliggett/jjversion:${{ env.VERSION }}" | |
if: ${{ github.ref == 'refs/heads/root' && env.VERSION != env.PREVIOUS_COMMIT_VERSION }} | |
- run: docker push "ghcr.io/jjliggett/jjversion:latest" | |
if: ${{ github.ref == 'refs/heads/root' && env.VERSION != env.PREVIOUS_COMMIT_VERSION }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | |
if: ${{ github.ref == 'refs/heads/root' && env.VERSION != env.PREVIOUS_COMMIT_VERSION }} | |
with: | |
registry: docker.io | |
username: jjliggett | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: docker push "jjliggett/jjversion:${{ env.VERSION }}" | |
if: ${{ github.ref == 'refs/heads/root' && env.VERSION != env.PREVIOUS_COMMIT_VERSION }} | |
- run: docker push jjliggett/jjversion | |
if: ${{ github.ref == 'refs/heads/root' && env.VERSION != env.PREVIOUS_COMMIT_VERSION }} | |
- name: Create GitHub release | |
uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 | |
if: ${{ github.ref == 'refs/heads/root' && env.VERSION != env.PREVIOUS_COMMIT_VERSION }} | |
with: | |
repo_token: "${{ secrets.GH_PUBLISH_TOKEN }}" | |
automatic_release_tag: v${{ env.VERSION }} | |
prerelease: false | |
files: | | |
jjversion-${{ env.VERSION }}-linux-x64.zip | |
jjversion-${{ env.VERSION }}-linux-arm64.zip | |
jjversion-${{ env.VERSION }}-linux-arm.zip | |
jjversion-${{ env.VERSION }}-linux-386.zip | |
jjversion-${{ env.VERSION }}-darwin-amd64.zip | |
jjversion-${{ env.VERSION }}-windows-x64.zip | |
jjversion-${{ env.VERSION }}-windows-386.zip | |
jjversion-${{ env.VERSION }}-windows-arm.zip | |
README.md | |
LICENSE.md | |
jjversion-${{ env.VERSION }}-docs.zip | |
test-release-branch: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: git checkout -b release/10.42.11 | |
- run: git commit -m "initial commit" --allow-empty | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: ls -R -al | |
- run: sudo cp jjversion /usr/local/bin | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 10.42.11 | |
- run: jjversion | jq --raw-output '.Major' | grep 10 | |
- run: jjversion | jq --raw-output '.Minor' | grep 42 | |
- run: jjversion | jq --raw-output '.Patch' | grep 11 | |
- run: jjversion | jq --raw-output '.Sha' | grep $(git rev-parse HEAD) | |
test-release-branch-and-tag: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: git checkout -b release/10.42.11 | |
- run: git commit -m "initial commit" --allow-empty | |
- run: git tag v42.43.44 | |
- run: git tag -a v100.100.100 -m "v100.100.100" | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: ls -R -al | |
- run: sudo cp jjversion /usr/local/bin | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 10.42.11 | |
test-commit-incrementing: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
echo "commit_message_incrementing_enabled: true" >> versioning.yaml | |
git commit -m "minor: initial commit" --allow-empty | |
git commit -m "patch: fix small bug" --allow-empty | |
git commit -m "patch: fix another bug" --allow-empty | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.1.2 | |
- run: | | |
git commit -m "minor: added a feature" --allow-empty | |
git commit -m "minor: added another feature" --allow-empty | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.3.0 | |
- run: | | |
git commit -m "major: breaking changes etc." --allow-empty | |
git commit -m "minor: added new option" --allow-empty | |
git commit -m "minor: added another option" --allow-empty | |
git commit -m "patch: fixed a bug" --allow-empty | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.6.1 | |
- run: | | |
git commit -m "major: release 1.0.0" --allow-empty | |
git tag v1.0.0 | |
git commit -m "minor: added another feature" --allow-empty | |
git commit -m "major: breaking changes" --allow-empty | |
git commit -m "minor: small update" --allow-empty | |
git commit -m "patch: bugfix for etc." --allow-empty | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 2.1.1 | |
test-commit-tags-annotated-highest: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
git commit -m "Initial commit" --allow-empty | |
git tag v0.0.1 | |
git tag v0.1.0 | |
git tag -a "v0.0.10" -m "v0.0.10" | |
git tag -a "v1.0.0" -m "v1.0.0" | |
git tag -a "v0.10.0" -m "v0.10.0" | |
git tag v0.11.0 | |
- run: git show --quiet HEAD | |
- run: git tag -n | |
- run: git show-ref --tags -d | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 1.0.0 | |
test-commit-tags-lightweight-highest: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
git commit -m "Initial commit" --allow-empty | |
git tag v0.0.1 | |
git tag v0.1.0 | |
git tag -a "v0.0.10" -m "v0.0.10" | |
git tag v1.1.1 | |
git tag -a "v1.0.0" -m "v1.0.0" | |
git tag -a "v0.10.0" -m "v0.10.0" | |
git tag v0.11.0 | |
- run: git show --quiet HEAD | |
- run: git tag -n | |
- run: git show-ref --tags -d | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 1.1.1 | |
test-docker-release-branch: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: git checkout -b release/10.42.11 | |
- run: git commit -m "initial commit" --allow-empty | |
- name: Download jjversion.tar | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion.tar | |
- run: docker load < jjversion.tar | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 10.42.11 | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.Major' | grep 10 | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.Minor' | grep 42 | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.Patch' | grep 11 | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.Sha' | grep $(git rev-parse HEAD) | |
test-docker-release-branch-and-tag: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: git checkout -b release/10.42.11 | |
- run: git commit -m "initial commit" --allow-empty | |
- run: git tag v42.43.44 | |
- run: git tag -a v100.100.100 -m "v100.100.100" | |
- name: Download jjversion.tar | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion.tar | |
- run: docker load < jjversion.tar | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 10.42.11 | |
test-docker-commit-incrementing: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- name: Download jjversion.tar | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion.tar | |
- run: docker load < jjversion.tar | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
echo "commit_message_incrementing_enabled: true" >> versioning.yaml | |
git commit -m "minor: initial commit" --allow-empty | |
git commit -m "patch: fix small bug" --allow-empty | |
git commit -m "patch: fix another bug" --allow-empty | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.1.2 | |
- run: | | |
git commit -m "minor: added a feature" --allow-empty | |
git commit -m "minor: added another feature" --allow-empty | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.3.0 | |
- run: | | |
git commit -m "major: breaking changes etc." --allow-empty | |
git commit -m "minor: added new option" --allow-empty | |
git commit -m "minor: added another option" --allow-empty | |
git commit -m "patch: fixed a bug" --allow-empty | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.6.1 | |
- run: | | |
git commit -m "major: release 1.0.0" --allow-empty | |
git tag v1.0.0 | |
git commit -m "minor: added another feature" --allow-empty | |
git commit -m "major: breaking changes" --allow-empty | |
git commit -m "minor: small update" --allow-empty | |
git commit -m "patch: bugfix for etc." --allow-empty | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 2.1.1 | |
test-docker-commit-tags-annotated-highest: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- name: Download jjversion.tar | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion.tar | |
- run: docker load < jjversion.tar | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
git commit -m "Initial commit" --allow-empty | |
git tag v0.0.1 | |
git tag v0.1.0 | |
git tag -a "v0.0.10" -m "v0.0.10" | |
git tag -a "v1.0.0" -m "v1.0.0" | |
git tag -a "v0.10.0" -m "v0.10.0" | |
git tag v0.11.0 | |
- run: git show --quiet HEAD | |
- run: git tag -n | |
- run: git show-ref --tags -d | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 1.0.0 | |
test-docker-commit-tags-lightweight-highest: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- name: Download jjversion.tar | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion.tar | |
- run: docker load < jjversion.tar | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
git commit -m "Initial commit" --allow-empty | |
git tag v0.0.1 | |
git tag v0.1.0 | |
git tag -a "v0.0.10" -m "v0.0.10" | |
git tag v1.1.1 | |
git tag -a "v1.0.0" -m "v1.0.0" | |
git tag -a "v0.10.0" -m "v0.10.0" | |
git tag v0.11.0 | |
- run: git show --quiet HEAD | |
- run: git tag -n | |
- run: git show-ref --tags -d | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | |
- run: docker run --rm -v "$(pwd):/repo" jjliggett/jjversion | jq --raw-output '.MajorMinorPatch' | grep 1.1.1 | |
test-commit-incrementing-custom-versioning-settings: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
echo "commit_message_incrementing_enabled: true" >> versioning.yaml | |
echo "major_version_bump_message: '^((first):)'" >> versioning.yaml | |
echo "minor_version_bump_message: '^((second):)'" >> versioning.yaml | |
echo "patch_version_bump_message: '^((third):)'" >> versioning.yaml | |
git commit -m "second: initial commit" --allow-empty | |
git commit -m "minor: commit" --allow-empty | |
git commit -m "third: fix small bug" --allow-empty | |
git commit -m "third: fix another bug" --allow-empty | |
git commit -m "patch: fix small bug" --allow-empty | |
git commit -m "patch: fix another bug" --allow-empty | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.1.2 | |
- run: | | |
git commit -m "first: release 1.0.0" --allow-empty | |
git tag v1.0.0 | |
git commit -m "first: major commit" --allow-empty | |
git commit -m "major: major commit" --allow-empty | |
git commit -m "third: bugfix" --allow-empty | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 2.0.1 | |
test-commit-incrementing-no-settings: | |
runs-on: ubuntu-latest | |
needs: initial-build | |
steps: | |
- name: Download jjversion | |
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 | |
with: | |
name: jjversion | |
- run: chmod +x jjversion | |
- run: sudo mv jjversion /usr/local/bin | |
- run: mkdir repo && cd repo | |
- run: git init | |
- run: git config user.email "[email protected]" | |
- run: git config user.name "user" | |
- run: | | |
git commit -m "minor: initial commit" --allow-empty | |
git commit -m "patch: fix small bug" --allow-empty | |
git commit -m "patch: fix another bug" --allow-empty | |
- run: jjversion | |
- run: jjversion | jq --raw-output '.MajorMinorPatch' | grep 0.0.0 |