From 4bc736139d76bb348b1c6e2db0df5258a70ba6c7 Mon Sep 17 00:00:00 2001 From: Emad Mokhtar Date: Sun, 21 Apr 2024 11:06:01 +0200 Subject: [PATCH] V2/semver action (#109) * Add semantic version GitHub action --- .github/workflows/go-test.yaml | 1 + .github/workflows/golangci-lint.yml | 1 + .github/workflows/semver-lable.yml | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 .github/workflows/semver-lable.yml diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml index e2bb70c..b318094 100644 --- a/.github/workflows/go-test.yaml +++ b/.github/workflows/go-test.yaml @@ -5,6 +5,7 @@ on: branches: - master - main + - v2/master pull_request: jobs: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 4a4e43b..54ea66b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -4,6 +4,7 @@ on: branches: - master - main + - v2/master pull_request: permissions: diff --git a/.github/workflows/semver-lable.yml b/.github/workflows/semver-lable.yml new file mode 100644 index 0000000..a50ca97 --- /dev/null +++ b/.github/workflows/semver-lable.yml @@ -0,0 +1,24 @@ +name: Semantic Versioning Label + +on: + push: + branches: + - v2/master + +jobs: + semver_tag_from_pr: + # permissions required to find PR for last commit and push the new tag + permissions: + contents: write + pull-requests: read + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: "0" # we need full git-history to determine the last semVer tag + ssh-key: ${{ secrets.semver_github_action }} + - name: bump semVer + uses: simontheleg/semver-tag-from-pr-action@v1 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + repo_ssh_key: ${{ secrets.SEMVER_GITHUB_ACTION_PRIVATE }} \ No newline at end of file