Skip to content

chore: remove Jackett RSS diagnostic logging #77

chore: remove Jackett RSS diagnostic logging

chore: remove Jackett RSS diagnostic logging #77

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
# Create the GitHub Release first with annotated tag message as body.
# Build jobs then only upload assets without overwriting the body.
create-release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
steps:
- uses: actions/checkout@v4
- name: Create Release
id: release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ github.ref_name }}" \
--notes-from-tag \
--title "${{ github.ref_name }}" \
--prerelease=${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}
build:
name: ${{ matrix.goos }}-${{ matrix.goarch }}
runs-on: ${{ matrix.runner }}
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- { goos: linux, goarch: amd64, runner: ubuntu-latest, cc: gcc }
- { goos: linux, goarch: arm64, runner: ubuntu-latest, cc: aarch64-linux-gnu-gcc }
- { goos: darwin, goarch: amd64, runner: macos-latest, cc: clang }
- { goos: darwin, goarch: arm64, runner: macos-latest, cc: clang }
- { goos: windows, goarch: amd64, runner: ubuntu-latest, cc: x86_64-w64-mingw32-gcc }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Install cross-compilers
if: matrix.goos == 'linux' && matrix.goarch == 'arm64' || matrix.goos == 'windows'
run: |
sudo apt-get update
if [ "${{ matrix.goarch }}" = "arm64" ]; then
sudo apt-get install -y gcc-aarch64-linux-gnu
fi
if [ "${{ matrix.goos }}" = "windows" ]; then
sudo apt-get install -y gcc-mingw-w64-x86-64
fi
- name: Build
shell: bash
env:
CGO_ENABLED: 1
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CC: ${{ matrix.cc }}
run: |
EXT=""
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
VERSION=${{ github.ref_name }}
go build -ldflags="-s -w -X github.com/mguyenanastacio-glitch/pan-fetcher/server.Version=${VERSION}" -o "pan-fetcher${EXT}" .
- name: Package (tar.gz)
if: matrix.goos != 'windows'
run: tar -czf pan-fetcher-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz pan-fetcher
- name: Package (zip)
if: matrix.goos == 'windows'
run: zip pan-fetcher-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.zip pan-fetcher.exe
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: pan-fetcher-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.*
docker:
name: Docker Image
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/pan-fetcher:latest
${{ secrets.DOCKER_USERNAME }}/pan-fetcher:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/pan-fetcher:latest
ghcr.io/${{ github.repository_owner }}/pan-fetcher:${{ github.ref_name }}