-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: use GitHub's gh tool and get rid of softprop and graphql-action (#73
) * release.yml: use gh api graphql * release.yml: use 'gh release' Signed-off-by: Christian Brabandt <[email protected]>
- Loading branch information
Showing
1 changed file
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,10 @@ jobs: | |
|
||
- name: Get latest tags | ||
id: latest-tags | ||
uses: octokit/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
owner: ${{ steps.param.outputs.owner }} | ||
repo: ${{ steps.param.outputs.repo }} | ||
query: | | ||
query($owner:String!,$repo:String!) { | ||
appimage: repository(owner:$owner, name:$repo) { | ||
|
@@ -45,16 +45,19 @@ jobs: | |
} | ||
} | ||
} | ||
owner: ${{ steps.param.outputs.owner }} | ||
repo: ${{ steps.param.outputs.repo }} | ||
jq_extract: >+ | ||
"vim_tag=" + .data.vim.refs.edges[0].node.name, | ||
"appimage_tag=" + .data.appimage.refs.edges[0].node.name | ||
run: | | ||
gh api graphql -F owner="$owner" -F repo="$repo" -f query="$query" --jq "$jq_extract" | \ | ||
tee -a "$GITHUB_ENV" | ||
- name: Check updates | ||
id: check-updates | ||
run: | | ||
appimage_tag=${{ fromJSON(steps.latest-tags.outputs.data).appimage.refs.edges[0].node.name }} | ||
vim_tag=${{ fromJSON(steps.latest-tags.outputs.data).vim.refs.edges[0].node.name }} | ||
echo "appimagetag=${appimage_tag}" >> "$GITHUB_OUTPUT" | ||
echo "updated=$([[ ${appimage_tag} != ${vim_tag} ]] && echo true)" >> "$GITHUB_OUTPUT" | ||
printf >> "$GITHUB_OUTPUT" '%s\n' \ | ||
"appimagetag=${appimage_tag}" \ | ||
"updated=$([[ ${appimage_tag} != ${vim_tag} ]] && echo true)" | ||
create-appimage-job: | ||
runs-on: ubuntu-20.04 | ||
|
@@ -144,11 +147,10 @@ jobs: | |
git push --follow-tags -u origin "${GITHUB_REF_NAME}" | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: release.body | ||
name: 'Vim: ${{ steps.commit.outputs.tag_name }}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag_name: ${{ steps.commit.outputs.tag_name }} | ||
files: | | ||
*.AppImage | ||
*.zsync | ||
run: | | ||
gh release create "$tag_name" \ | ||
*.AppImage *.zsync \ | ||
-F release.body -t "Vim: $tag_name" |