diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9f43b92..cd74f8c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -28,6 +28,30 @@ jobs: kewt 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: runs-on: local needs: build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 002c615..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9e0c50e..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -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