From b92588fa7f29b3d347986da3ed17f9113b40703d Mon Sep 17 00:00:00 2001 From: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:49:25 +0000 Subject: [PATCH] Use constants and push for tag-test Fix typo in releases.yml --- .github/workflows/releases.yml | 2 +- .github/workflows/tag-test.yml | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 928ba423..c87bc86c 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -19,7 +19,7 @@ jobs: - id: commit run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - id: tag - run: echo "tag=${{ github.event.inputs.package }}-$(cat packages/tool-cache/package.json | jq .version)" >> "$GITHUB_OUTPUT" + run: echo "tag=${{ github.event.inputs.package }}-$(cat packages/${{ github.event.inputs.package }}/package.json | jq .version)" >> "$GITHUB_OUTPUT" - name: verify package exists run: ls packages/${{ github.event.inputs.package }} diff --git a/.github/workflows/tag-test.yml b/.github/workflows/tag-test.yml index e6d68374..5fde93d4 100644 --- a/.github/workflows/tag-test.yml +++ b/.github/workflows/tag-test.yml @@ -1,11 +1,6 @@ name: Tag test -on: - workflow_dispatch: - inputs: - package: - required: true - description: 'core, artifact, cache, exec, github, glob, http-client, io, tool-cache' +on: push jobs: test: @@ -19,15 +14,15 @@ jobs: - id: commit run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - id: tag - run: echo "tag=${{ github.event.inputs.package }}-$(cat packages/tool-cache/package.json | jq .version)" >> "$GITHUB_OUTPUT" + run: echo "tag=http-client-$(cat packages/http-client/package.json | jq .version)" >> "$GITHUB_OUTPUT" publish: runs-on: macos-latest needs: test steps: - - name: foo - run: echo "foo" + - name: skip publish + run: echo "skip publish" tag: - name: "Tag commit with ${{ github.event.inputs.package }}-version" + name: "Tag ${{ needs.test.outputs.sha }} with ${{ needs.test.outputs.tag }}" runs-on: "macos-latest" needs: [test, publish] steps: