Skip to content

fix: secondaries are no longer ignored (#413) #19

fix: secondaries are no longer ignored (#413)

fix: secondaries are no longer ignored (#413) #19

name: production-build
on:
push:
tags:
- '*'
jobs:
goreleaser-production:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
- name: Generate goreleaser config
run: make generate-goreleaser-config
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release -f .goreleaser.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: goreleaser-artifacts
path: bin/
deploy-binaries:
needs:
- goreleaser-production
runs-on: ubuntu-latest
env:
FTPS_USER_REPO: ${{ secrets.FTPS_USER_REPO }}
FTPS_PW_REPO: ${{ secrets.FTPS_PW_REPO }}
FTPS_HOST_REPO: ${{ secrets.FTPS_HOST_REPO }}
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: goreleaser-artifacts
path: bin/
- name: Install lftp
run: |
sudo apt-get update
sudo apt-get --yes install lftp
- name: Extract semantic version
run: echo "SEMANTIC_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Deploy artifacts to latest path
run: lftp -c "set ftp:ssl-force true; set ssl:verify-certificate false; open -u $FTPS_USER_REPO,$FTPS_PW_REPO $FTPS_HOST_REPO; mirror --verbose --include-glob='*.deb' --include-glob='*.txt' --reverse --no-recursion --delete bin/ ./latest/; bye"
- name: Deploy artifacts to versioned path
run: lftp -c "set ftp:ssl-force true; set ssl:verify-certificate false; open -u $FTPS_USER_REPO,$FTPS_PW_REPO $FTPS_HOST_REPO; mirror --verbose --include-glob='*.deb' --include-glob='*.txt' --include-glob='*.tar.gz' --reverse --no-recursion --delete bin/ ./archive/${{ env.SEMANTIC_VERSION }}/; bye"