try new release
All checks were successful
build

This commit is contained in:
Joe Kaufeld 2023-03-23 19:30:25 -04:00
parent 53499b0cbf
commit 10ee297269
2 changed files with 13 additions and 11 deletions

View File

@ -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

View File

@ -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