Skip to content

Commit

Permalink
Merge pull request #49 from duplocloud/releaser
Browse files Browse the repository at this point in the history
let it run manually to debug
  • Loading branch information
kferrone authored Mar 8, 2024
2 parents c31b4a9 + 9013162 commit d2b5eb5
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Releaser

on:
workflow_call:
workflow_dispatch:

jobs:
releaser:
Expand All @@ -21,30 +22,6 @@ jobs:
echo "GIT_TAG=${GIT_TAG}" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "NAME=${NAME}" >> $GITHUB_OUTPUT
- name: Build Release Message
id: message
env:
GIT_TAG: ${{ steps.set_tag.outputs.GIT_TAG }}
VERSION: ${{ steps.set_tag.outputs.VERSION }}
run: |
MESSAGE="$(cat <<EOF
duploctl ${GIT_TAG} is out!.
PyPi:
[duplocloud-client](https://pypi.org/project/duplocloud-client/${VERSION}/)
```sh
pip install duplocloud-client==${VERSION}
```
Dockerhub:
[duplocloud/duploctl:${GIT_TAG}](https://hub.docker.com/r/duplocloud/duploctl)
```sh
docker pull duplocloud/duploctl:${GIT_TAG}
```
EOF
)"
echo "MESSAGE=${MESSAGE}" >> $GITHUB_OUTPUT
- name: Download Artifacts
uses: actions/download-artifact@v4
Expand All @@ -69,8 +46,21 @@ jobs:
with:
files: |
dist/*
body: ${{ steps.message.outputs.MESSAGE }}
prerelease: ${{ github.event.inputs.prerelease }}
body: |
duploctl ${{ steps.set_tag.outputs.GIT_TAG }} is out!.
PyPi:
[duplocloud-client](https://pypi.org/project/duplocloud-client/${{ steps.set_tag.outputs.VERSION }}/)
```sh
pip install duplocloud-client==${{ steps.set_tag.outputs.VERSION }}
```
Dockerhub:
[duplocloud/duploctl:${{ steps.set_tag.outputs.GIT_TAG }}](https://hub.docker.com/r/duplocloud/duploctl)
```sh
docker pull duplocloud/duploctl:${{ steps.set_tag.outputs.GIT_TAG }}
```
prerelease: false

- name: Post to a Slack channel
id: slack
Expand All @@ -85,6 +75,14 @@ jobs:
- name: Job Summary
env:
MESSAGE: ${{ steps.message.outputs.MESSAGE }}
run: echo "$MESSAGE" >> $GITHUB_STEP_SUMMARY
GIT_TAG: ${{ steps.set_tag.outputs.GIT_TAG }}
URL: ${{ steps.release.outputs.url }}
VERSION: ${{ steps.set_tag.outputs.VERSION }}
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
Tag: $GIT_TAG
Release: $URL
Docker: duplocloud/duploctl:${GIT_TAG}
PyPi: duplocloud-client==${VERSION}
EOF

0 comments on commit d2b5eb5

Please sign in to comment.