fix(ci): move to Create Release action
This commit is contained in:
parent
1b0b193a08
commit
46881a8a45
@ -13,12 +13,12 @@ on:
|
|||||||
value: ${{ jobs.create_release.outputs.success }}
|
value: ${{ jobs.create_release.outputs.success }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create_release:
|
get_next_release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# needs: test
|
|
||||||
outputs:
|
outputs:
|
||||||
release_name: ${{ steps.get_next_version.outputs.tag }}
|
release_name: ${{ steps.get_next_version.outputs.tag }}
|
||||||
|
changelog: ${{ steps.get_next_version.outputs.changelog }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
@ -68,11 +68,26 @@ jobs:
|
|||||||
skip-version-file: true
|
skip-version-file: true
|
||||||
skip-tag: true
|
skip-tag: true
|
||||||
|
|
||||||
|
create_release:
|
||||||
|
name: Create Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: get_next_release
|
||||||
|
outputs:
|
||||||
|
success: ${{ steps.set_flag.outputs.success }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
run: |
|
uses: https://git.tainton.uk/actions/create-release-action@v1.0.0
|
||||||
curl -s -X POST \
|
with:
|
||||||
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
release_name: ${{ needs.get_next_release.outputs.release_name }}
|
||||||
-H "accept: application/json" \
|
tag: ${{ needs.get_next_release.outputs.release_name }}
|
||||||
-H "Content-Type: application/json" \
|
body: ${{ needs.get_next_release.outputs.changelog }}
|
||||||
-d "{\"tag_name\": \"${{ steps.get_next_version.outputs.tag }}\", \"name\": \"${{ steps.get_next_version.outputs.tag }}\", \"body\": \"${{ steps.get_next_version.outputs.changelog }}\"}" \
|
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases"
|
- name: Set success/fail flag
|
||||||
|
id: set_flag
|
||||||
|
if: steps.changes.outputs.changes == 'true'
|
||||||
|
run: echo "success=true" >> "$GITEA_OUTPUT"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user