Compare commits
19 Commits
main
...
fhammerl/t
| Author | SHA1 | Date |
|---|---|---|
|
|
5a16fe72bf | |
|
|
88d5c3d103 | |
|
|
7c38e6fc88 | |
|
|
f7c54864a4 | |
|
|
2159b716f6 | |
|
|
d32efbf702 | |
|
|
084bcce189 | |
|
|
301e5cd5de | |
|
|
3645c84be9 | |
|
|
9d7fee4ab4 | |
|
|
95edd3418c | |
|
|
4419cadd68 | |
|
|
0d44da2b87 | |
|
|
cb86beb23a | |
|
|
7edb0957cc | |
|
|
b92588fa7f | |
|
|
39e91a437a | |
|
|
4166af5b3e | |
|
|
b8bef557c0 |
|
|
@ -9,11 +9,17 @@ on:
|
|||
|
||||
jobs:
|
||||
test:
|
||||
outputs:
|
||||
sha: ${{ steps.commit.outputs.sha }}
|
||||
tag: ${{ steps.tag.outputs.tag }}
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: setup repo
|
||||
uses: actions/checkout@v3
|
||||
- id: commit
|
||||
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||
- id: tag
|
||||
run: echo "tag=@actions/${{ github.event.inputs.package }}@$(cat packages/${{ github.event.inputs.package }}/package.json | jq -r .version)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: verify package exists
|
||||
run: ls packages/${{ github.event.inputs.package }}
|
||||
|
|
@ -77,4 +83,26 @@ jobs:
|
|||
curl -X POST -H 'Content-type: application/json' --data '{"text":":dance: Successfully published a new version of ${{ github.event.inputs.package }}"}' $SLACK_WEBHOOK
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK }}
|
||||
tag:
|
||||
name: "Tag ${{ needs.test.outputs.sha }} with ${{ needs.test.outputs.tag }}"
|
||||
runs-on: "macos-latest"
|
||||
needs: [test, publish]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create tag
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
github.rest.git.createRef({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: 'refs/tags/${{ needs.test.outputs.tag }}',
|
||||
sha: '${{ needs.test.outputs.sha }}'
|
||||
})
|
||||
- name: notify slack on failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' --data '{"text":":pb__failed: Publish of ${{ github.event.inputs.package }} was successful, but failed to tag commit ${{ needs.test.outputs.sha }} with version ${{ needs.test.outputs.tag }}"}' $SLACK_WEBHOOK
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK }}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue