Auto GitHub
This commit is contained in:
@@ -28,6 +28,30 @@ jobs:
|
|||||||
kewt
|
kewt
|
||||||
api_key: '${{secrets.GITEA_TOKEN}}'
|
api_key: '${{secrets.GITEA_TOKEN}}'
|
||||||
|
|
||||||
|
- name: Push to GitHub Release
|
||||||
|
run: |
|
||||||
|
TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
|
||||||
|
# Create the release on GitHub
|
||||||
|
curl -sL -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.GH_RELEASE_TOKEN }}" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
"https://api.github.com/repos/n0va-bot/kewt/releases" \
|
||||||
|
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}" || true
|
||||||
|
|
||||||
|
# Get the release ID
|
||||||
|
RELEASE_ID=$(curl -sL \
|
||||||
|
-H "Authorization: token ${{ secrets.GH_RELEASE_TOKEN }}" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
"https://api.github.com/repos/n0va-bot/kewt/releases/tags/${TAG}" | jq -r '.id')
|
||||||
|
|
||||||
|
# Upload the asset
|
||||||
|
curl -sL -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.GH_RELEASE_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
"https://uploads.github.com/repos/n0va-bot/kewt/releases/${RELEASE_ID}/assets?name=kewt" \
|
||||||
|
--data-binary @kewt
|
||||||
|
|
||||||
publish-aur:
|
publish-aur:
|
||||||
runs-on: local
|
runs-on: local
|
||||||
needs: build
|
needs: build
|
||||||
|
|||||||
16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master ]
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
shellcheck:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install Shellcheck
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y shellcheck
|
|
||||||
- name: Run Shellcheck
|
|
||||||
run: shellcheck kewt.sh markdown.sh tools/build-standalone.sh || true
|
|
||||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -1,25 +0,0 @@
|
|||||||
name: Release Standalone Builder
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Build standalone executable
|
|
||||||
run: |
|
|
||||||
chmod +x tools/build-standalone.sh
|
|
||||||
./tools/build-standalone.sh
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: kewt
|
|
||||||
Reference in New Issue
Block a user