2024-08-01 10:51:47 -05:00
|
|
|
name: goreleaser
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
# run only against tags
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
# packages: write
|
|
|
|
# issues: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
|
|
|
runs-on: docker
|
2024-08-01 11:32:28 -05:00
|
|
|
container:
|
|
|
|
image: ghcr.io/goreleaser/goreleaser:v2.1.0
|
2024-08-01 10:51:47 -05:00
|
|
|
steps:
|
2024-08-01 11:36:55 -05:00
|
|
|
- name: Checkout
|
2024-08-01 12:33:39 -05:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-08-01 12:54:32 -05:00
|
|
|
REPO_URL: https://x-access-token:${GITHUB_TOKEN}@git.hsn.dev/${{ github.repository }}
|
2024-08-01 12:33:39 -05:00
|
|
|
run: |
|
2024-08-01 12:48:15 -05:00
|
|
|
mkdir -p ${{ github.workspace }}
|
2024-08-01 12:33:39 -05:00
|
|
|
echo "URL: ${{ env.REPO_URL }}"
|
2024-08-01 12:56:49 -05:00
|
|
|
git clone --depth 1 ${{ env.REPO_URL }} ${{ github.workspace }}
|
2024-08-01 12:33:39 -05:00
|
|
|
echo "Repository cloned!"
|
2024-08-01 11:36:55 -05:00
|
|
|
- name: Run goreleaser
|
2024-08-01 13:05:02 -05:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ""
|
|
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
2024-08-01 11:36:55 -05:00
|
|
|
run: |
|
2024-08-01 11:32:28 -05:00
|
|
|
echo ${{ github.workspace }}
|
2024-08-01 12:54:32 -05:00
|
|
|
goreleaser release
|