Add rolling-release CI
This commit is contained in:
parent
707d5f19fb
commit
e38343593f
38
.github/workflows/release.yml
vendored
38
.github/workflows/release.yml
vendored
@ -1,8 +1,6 @@
|
|||||||
name: Release
|
name: Release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -30,6 +28,26 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: python -m build
|
run: python -m build
|
||||||
|
|
||||||
|
- name: Set GITHUB_RELEASE_TAG & ARTIFACT_ID
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
if [[ '${{ github.ref }}' = refs/tags/v* ]]; then
|
||||||
|
tag='${{ github.ref }}'
|
||||||
|
tag="${tag:10}"
|
||||||
|
artifactID="${tag:1}"
|
||||||
|
else
|
||||||
|
tag=CI
|
||||||
|
artifactID='${{ github.sha }}'
|
||||||
|
artifactID="${artifactID:0:8}"
|
||||||
|
fi
|
||||||
|
echo "GITHUB_RELEASE_TAG=$tag" >> $GITHUB_ENV
|
||||||
|
echo "ARTIFACT_ID=$artifactID" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Rename artifacts
|
||||||
|
run: |
|
||||||
|
mv dist/pumpkin_api_py-*-py3-none-any.whl dist/pumpkin_api_py-${ARTIFACT_ID}-py3-none-any.whl
|
||||||
|
mv dist/pumpkin_api_py-*.tar.gz dist/pumpkin_api_py-${ARTIFACT_ID}.tar.gz
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@ -37,11 +55,13 @@ jobs:
|
|||||||
path: dist/pumpkin_api_py*
|
path: dist/pumpkin_api_py*
|
||||||
|
|
||||||
- name: Upload artifacts to release
|
- name: Upload artifacts to release
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
uses: ncipollo/release-action@v1
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
tag: ${{ env.GITHUB_RELEASE_TAG }}
|
||||||
tag: ${{ github.ref }}
|
artifacts: dist/pumpkin_api_py*
|
||||||
file: dist/pumpkin_api_py*
|
allowUpdates: true
|
||||||
overwrite: true
|
omitPrereleaseDuringUpdate: true
|
||||||
file_glob: true
|
omitName: true
|
||||||
|
omitBody: true
|
||||||
|
omitDraftDuringUpdate: true
|
||||||
|
removeArtifacts: true
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "pumpkin-api-py"
|
name = "pumpkin-api-py"
|
||||||
version = "0.1.0.dev7"
|
version = "0.1.0"
|
||||||
description = "Pumpkin plugin API for Python"
|
description = "Pumpkin plugin API for Python"
|
||||||
authors = [{name = "alex"}]
|
authors = [{name = "alex"}]
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user