Skip to content

fix build

fix build #31

Workflow file for this run

name: Build tools
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.21'
id: go
- name: Install deps
run: sudo apt install -y python3 pandoc
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- name: Checkout LFS objects
run: git lfs checkout
- name: Pull tag
run: git fetch --tags
- uses: docker/login-action@v3
with:
username: 'reddec'
password: ${{ secrets.DOCKERIO_PASSWORD }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean --release-footer _footer.md --release-header release-note.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_PRODUCTION_USERNAME: ${{ secrets.UPLOAD_PRODUCTION_USERNAME }}
UPLOAD_PRODUCTION_SECRET: ${{ secrets.UPLOAD_PRODUCTION_SECRET }}
- name: Notify APT
run: |
PROJECT="$(cat dist/metadata.json | jq -r .project_name)"
# re-index
curl -X POST -H 'Content-Type: application/json' -u "${UPLOAD_PRODUCTION_USERNAME}:${UPLOAD_PRODUCTION_SECRET}" \
"https://apt.reddec.net/api/repos/reddec/file/${PROJECT}"
# publish
curl -X POST --keepalive-time 10 --max-time 240 -H 'Content-Type: application/json' -u "${UPLOAD_PRODUCTION_USERNAME}:${UPLOAD_PRODUCTION_SECRET}" \
--data '{"SourceKind": "local", "Sources": [{"Name":"reddec"}]}' \
https://apt.reddec.net/api/publish/s3:r2:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_PRODUCTION_USERNAME: ${{ secrets.UPLOAD_PRODUCTION_USERNAME }}
UPLOAD_PRODUCTION_SECRET: ${{ secrets.UPLOAD_PRODUCTION_SECRET }}