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