teldrive/.github/workflows/goreleaser.yml
2023-12-22 16:31:36 +05:30

39 lines
953 B
YAML

name: Goreleaser
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Set Vars
run: |
COMMIT=$(git rev-parse --short "${GITHUB_SHA}")
LINK="https://github.com/${GITHUB_REPOSITORY,,}/commit/${GITHUB_SHA}"
INFO="{ \"version\": \"${GITHUB_REF_NAME}\", \"commit\": \"${COMMIT}\", \"link\": \"${LINK}\"}"
echo "$INFO" > ./ui/teldrive-ui/version.json
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}