This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git
The following commit(s) were added to refs/heads/main by this push:
new d575963 get version workflow
d575963 is described below
commit d575963cd6215619b488187ea6053ebdb7794136
Author: Michele Sciabarra <[email protected]>
AuthorDate: Sat Dec 14 21:13:03 2024 +0100
get version workflow
---
.github/workflows/contrib.yml | 46 +++++++++++++++++++------------------------
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml
index f78e910..f5bd3b6 100644
--- a/.github/workflows/contrib.yml
+++ b/.github/workflows/contrib.yml
@@ -21,37 +21,31 @@ on:
pull_request:
branches:
- "main"
- types: [closed]
-
-permissions:
- contents: write
+ types:
+ - "closed"
jobs:
- goreleaser:
- if: ${{ github.event.pull_request.merged }}
+ if: ${{ github.event.pull_request.merged }}
+ share_version:
runs-on: ubuntu-latest
+ outputs:
+ version: "${{ steps.get_version.outputs.version }}"
steps:
- name: Checkout
uses: actions/checkout@v4
- - name: Check Dependencies' License
- uses: apache/skywalking-eyes/dependency@main # always prefer to
use a revision instead of `main`.
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: '>=1.22.5'
- - name: Run Tests
+ - name: Get Version
+ id: get_version
run: |
- ls -l
- sudo sh -c "$(curl --location https://taskfile.dev/install.sh)"
-- -d -b /usr/local/bin
- task install
- source ~/.bashrc
- ops -version
- task tests
- - name: Run GoReleaser
- uses: goreleaser/goreleaser-action@v6
+ version="v$(cat version.txt)"
+ echo "Version: $version"
+ # Set the version as an output
+ echo "::set-output name=version::$version"
+ push_tag:
+ runs-on: ubuntu-latest
+ needs: read_version
+ steps:
+ - name: Tag commit
+ uses: tvdias/[email protected]
with:
- distribution: goreleaser
- version: '~> v2'
- args: release --clean
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ tag: "${{ needs.share_version.outputs.version }}"