parent
53499b0cbf
commit
10ee297269
22
.github/workflows/build_and_release.yml
vendored
22
.github/workflows/build_and_release.yml
vendored
@ -12,8 +12,6 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v2
|
||||
- name: lsb_release -i -r -s
|
||||
run: lsb_release -i -r -s
|
||||
- uses: https://github.com/actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11.x'
|
||||
@ -29,11 +27,15 @@ jobs:
|
||||
run: |
|
||||
sed -i -e "s/?????/${{ env.CURRENT_TIME_VERSION }}/g" src/__init__.py
|
||||
make build
|
||||
- uses: https://github.com/ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "utils"
|
||||
body: "It's releasin' time"
|
||||
generateReleaseNotes: false
|
||||
tag: ${{ env.CURRENT_TIME_VERSION }}
|
||||
commit: master
|
||||
token: ${{ secrets.PAT }}
|
||||
- name: UPLOAD!
|
||||
run: |
|
||||
echo """release_id=$(\
|
||||
curl -s https://git.joekaufeld.com/api/v1/repos/jkaufeld/utils/releases \
|
||||
-H "Authorization: token ${{ secrets.PAT }}" \
|
||||
-d tag_name=${{ env.CURRENT_TIME_VERSION }} \
|
||||
| python3 -c "import sys, json; print(json.load(sys.stdin)['id'])"\
|
||||
)""" >> $GITHUB_ENV
|
||||
|
||||
curl https://git.joekaufeld.com/api/v1/repos/jkaufeld/utils/releases/${{ env.release_id }}/assets \
|
||||
-H "Authorization: token ${{ secrets.PAT }}" \
|
||||
-F attachment=@utils
|
||||
|
@ -106,7 +106,7 @@ def update():
|
||||
)
|
||||
return
|
||||
release_data = response.json()
|
||||
if release_data["name"] == src.__version__:
|
||||
if release_data["tag_name"] == src.__version__:
|
||||
click.echo("Server version is the same as current version; nothing to update.")
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user