From 6054341b8cb6af90733e3b1a3eba9dd9dc75a2b8 Mon Sep 17 00:00:00 2001 From: Fabian Simon Date: Sat, 30 Mar 2024 07:09:10 +0100 Subject: [PATCH] make svu over manual trigger reachable --- .github/workflows/job_tag.yml | 40 ++++++++++++++++------------------- .github/workflows/main.yml | 12 +++-------- gomake.yml | 11 ++++++++++ 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/job_tag.yml b/.github/workflows/job_tag.yml index 584ceda..b02fce5 100644 --- a/.github/workflows/job_tag.yml +++ b/.github/workflows/job_tag.yml @@ -1,26 +1,22 @@ name: Tag -on: - workflow_call: - secrets: - token: - required: true - -jobs: - tag: +on: + workflow_dispatch: +jobs: + tag: name: tag runs-on: ubuntu-latest steps: - # - name: Check out code into the Go module directory - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ - # - name: Set up Go 1.19 - # uses: actions/setup-go@v5 - # with: - # go-version: 1.19 - # id: go - # - name: Install svu - # - run: go install github.com/caarlos0/svu@latest + # - name: Check out code into the Go module directory + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ + # - name: Set up Go 1.19 + # uses: actions/setup-go@v5 + # with: + # go-version: 1.19 + # id: go + # - name: Install svu + # - run: go install github.com/caarlos0/svu@latest - name: Check out code into the Go module directory uses: actions/checkout@v4 with: @@ -31,10 +27,10 @@ jobs: with: go-version: 1.21 id: go - env: + env: GITHUB_TOKEN: ${{secrets.token}} - run: go install github.com/caarlos0/svu@latest - run: git config --local user.email "github-actions[bot]@users.noreply.github.com" - run: git config --local user.name "github-actions[bot]" - - run: git tag "$(svu next)" - - run: git push --tags \ No newline at end of file + - run: git tag "$(svu next)" + - run: git push --tags diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a9af426..8e4e0f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,15 +1,9 @@ name: Push to master -on: - push: +on: + push: branches: - main jobs: - tests: + tests: uses: ./.github/workflows/job_tests.yml - tag: - name: create tag - uses: ./.github/workflows/job_tag.yml - secrets: - token: ${{secrets.TOKEN}} - needs: [tests] \ No newline at end of file diff --git a/gomake.yml b/gomake.yml index 2a6ef0a..409807f 100644 --- a/gomake.yml +++ b/gomake.yml @@ -94,3 +94,14 @@ test:local: script: {{include "testSetup"}} {{include "testSqlite"}} + +next:tag:dry: + doc: show next tag with svu + script: + - svu next + +next:tag:push: + doc: Create next tag with svu + script: + - git tag "$(svu next)" + - git push --tags \ No newline at end of file