mirror of https://github.com/actions/toolkit
parent
301e5cd5de
commit
084bcce189
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- id: commit
|
- id: commit
|
||||||
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
- id: tag
|
- 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
|
- name: verify package exists
|
||||||
run: ls packages/${{ github.event.inputs.package }}
|
run: ls packages/${{ github.event.inputs.package }}
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
name: Tag test
|
name: Tag test
|
||||||
|
|
||||||
on:
|
on: push
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
package:
|
|
||||||
required: true
|
|
||||||
description: 'core, artifact, cache, exec, github, glob, http-client, io, tool-cache'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
@ -19,15 +14,15 @@ jobs:
|
||||||
- id: commit
|
- id: commit
|
||||||
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
- id: tag
|
- 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:
|
publish:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: test
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
- name: foo
|
- name: skip publish
|
||||||
run: echo "foo"
|
run: echo "skip publish"
|
||||||
tag:
|
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"
|
runs-on: "macos-latest"
|
||||||
needs: [test, publish]
|
needs: [test, publish]
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Reference in New Issue