From 11e0b039046870f8a58a01ae12c727a50d299d37 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Sat, 2 Dec 2023 00:47:01 +0000 Subject: [PATCH] Parse version from tag --- .github/workflows/publish.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 366afa1..c212da8 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,8 +1,5 @@ name: Publish Workflow on: - pull_request: # testing for now - branches: - - main push: tags: - v* @@ -28,9 +25,16 @@ jobs: - name: Run checks run: ./gradlew check + - name: Parse parameters + id: parse + run: | + export VERSION="$(echo ${{ github.ref_name }} | cut -c2-)" + echo "Parsed version: '$VERSION'" + echo "tinyvm_version=$VERSION" >> "$GITHUB_OUTPUT" + - name: Publish to Gitea package repository env: - TINYVM_VERSION: "0.0.0" # testing for now + TINYVM_VERSION: ${{ steps.parse.outputs.tinyvm_version }} GITEA_USERNAME: ${{ github.repository_owner }} GITEA_TOKEN: ${{ secrets.deploy_token }} run: ./gradlew publishAllPublicationsToGiteaRepository \ No newline at end of file