mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Update release workflows (#290)
Use `gh` CLI instead of third-party actions
This commit is contained in:
parent
a3305b6b57
commit
72970b9a4b
2 changed files with 19 additions and 43 deletions
50
.github/workflows/main.yml
vendored
50
.github/workflows/main.yml
vendored
|
|
@ -79,47 +79,23 @@ jobs:
|
||||||
echo "SHA256 checksums:"
|
echo "SHA256 checksums:"
|
||||||
find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
|
find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
|
||||||
- name: Delete ${{ env.TAG_NAME }} tag and release
|
- name: Delete ${{ env.TAG_NAME }} tag and release
|
||||||
uses: dev-drprasad/delete-tag-and-release@v1.1
|
env:
|
||||||
with:
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag_name: "${{ env.TAG_NAME }}"
|
run: |
|
||||||
delete_release: true
|
gh release delete "${{ env.TAG_NAME }}" --cleanup-tag -y || true
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Advance ${{ env.TAG_NAME }} tag
|
|
||||||
uses: actions/github-script@v8
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
await github.rest.git.createRef({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
ref: "refs/tags/${{ env.TAG_NAME }}",
|
|
||||||
sha: context.sha
|
|
||||||
})
|
|
||||||
|
|
||||||
- name: Create GitHub release
|
echo '### `${{ env.BRANCH_NAME }}` development build
|
||||||
uses: ncipollo/release-action@v1
|
|
||||||
with:
|
|
||||||
allowUpdates: true
|
|
||||||
artifactErrorsFailBuild: true
|
|
||||||
artifacts: "${{ steps.apks.outputs.apks }}"
|
|
||||||
draft: false
|
|
||||||
generateReleaseNotes: false
|
|
||||||
makeLatest: false
|
|
||||||
name: "${{ env.VERSION_NAME }}"
|
|
||||||
prerelease: true
|
|
||||||
removeArtifacts: true
|
|
||||||
replacesArtifacts: true
|
|
||||||
updateOnlyUnreleased: true
|
|
||||||
tag: "${{ env.TAG_NAME }}"
|
|
||||||
|
|
||||||
body: |
|
This pre-release tracks the development build of Wholphin from the `${{ env.BRANCH_NAME }}` unstable branch.
|
||||||
### `${{ env.BRANCH_NAME }}` development build
|
|
||||||
|
|
||||||
This pre-release tracks the development build of Wholphin from the `${{ env.BRANCH_NAME }}` unstable branch.
|
See https://github.com/damontecres/Wholphin/releases/latest for the latest stable release.
|
||||||
|
|
||||||
See https://github.com/damontecres/Wholphin/releases/latest for the latest stable release.
|
If you want to update to this version in-app, change Settings->Advanced->Update URL to https://api.github.com/repos/damontecres/Wholphin/releases/tags/${{ env.TAG_NAME }} (replace `latest` with `tags/${{ env.TAG_NAME }}`).
|
||||||
|
|
||||||
If you want to update to this version in-app, change Settings->Advanced->Update URL to https://api.github.com/repos/damontecres/Wholphin/releases/tags/${{ env.TAG_NAME }} (replace `latest` with `tags/${{ env.TAG_NAME }}`).
|
[See changes since `${{ env.LATEST_TAG }}`](https://github.com/damontecres/Wholphin/compare/${{ env.LATEST_TAG }}...${{ env.TAG_NAME }})' > ci_release_note.txt
|
||||||
|
|
||||||
[See changes since `${{ env.LATEST_TAG }}`](https://github.com/damontecres/Wholphin/compare/${{ env.LATEST_TAG }}...${{ env.TAG_NAME }})
|
|
||||||
|
gh release create "${{ env.TAG_NAME }}" \
|
||||||
|
--latest=false --prerelease --title "${{ env.TAG_NAME }}" --target "${{ env.BRANCH_NAME }}" -F ci_release_note.txt \
|
||||||
|
"app/build/outputs/apk/**/*.apk"
|
||||||
|
|
|
||||||
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
|
@ -60,9 +60,9 @@ jobs:
|
||||||
echo "SHA256 checksums:"
|
echo "SHA256 checksums:"
|
||||||
find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
|
find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
|
||||||
- name: Create GitHub release
|
- name: Create GitHub release
|
||||||
uses: ncipollo/release-action@v1
|
env:
|
||||||
with:
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
artifacts: "${{ steps.apks.outputs.apks }}"
|
run: |
|
||||||
makeLatest: true
|
gh release create "${{ env.TAG_NAME }}" \
|
||||||
prerelease: false
|
--latest --title "${{ env.TAG_NAME }}" --verify-tag -n "Placeholder" --draft \
|
||||||
generateReleaseNotes: false
|
"app/build/outputs/apk/**/*.apk"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue