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 }}
|
||||
|
||||
jobs:
|
||||
create_release:
|
||||
get_next_release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
# needs: test
|
||||
outputs:
|
||||
release_name: ${{ steps.get_next_version.outputs.tag }}
|
||||
changelog: ${{ steps.get_next_version.outputs.changelog }}
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
@ -68,11 +68,26 @@ jobs:
|
||||
skip-version-file: 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
|
||||
run: |
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-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"
|
||||
uses: https://git.tainton.uk/actions/create-release-action@v1.0.0
|
||||
with:
|
||||
release_name: ${{ needs.get_next_release.outputs.release_name }}
|
||||
tag: ${{ needs.get_next_release.outputs.release_name }}
|
||||
body: ${{ needs.get_next_release.outputs.changelog }}
|
||||
|
||||
- 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