2021-08-21 02:15:20 +09:00
|
|
|
---
|
2022-11-03 19:30:36 +09:00
|
|
|
name: Release
|
2021-06-13 20:13:17 +09:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2021-10-22 04:18:50 +09:00
|
|
|
- "*" # triggers only if push new tag version
|
2021-08-21 02:37:15 +09:00
|
|
|
workflow_dispatch:
|
2021-06-13 20:13:17 +09:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
2024-12-12 00:44:37 +09:00
|
|
|
if: github.repository == 'juanfont/headscale'
|
2022-12-05 17:10:51 +09:00
|
|
|
runs-on: ubuntu-latest
|
2021-06-13 20:13:17 +09:00
|
|
|
steps:
|
2021-10-22 04:18:50 +09:00
|
|
|
- name: Checkout
|
2024-03-13 21:43:06 +09:00
|
|
|
uses: actions/checkout@v4
|
2021-06-13 20:13:17 +09:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-10-22 02:56:36 +09:00
|
|
|
|
2024-02-13 00:01:56 +09:00
|
|
|
- name: Login to DockerHub
|
2024-03-13 21:43:06 +09:00
|
|
|
uses: docker/login-action@v3
|
2024-02-13 00:01:56 +09:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Login to GHCR
|
2024-03-13 21:43:06 +09:00
|
|
|
uses: docker/login-action@v3
|
2024-02-13 00:01:56 +09:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2023-06-28 19:56:35 +09:00
|
|
|
- uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
2022-12-05 17:10:51 +09:00
|
|
|
|
|
|
|
- name: Run goreleaser
|
2024-02-12 23:09:19 +09:00
|
|
|
run: nix develop --command -- goreleaser release --clean
|
2021-06-13 20:13:17 +09:00
|
|
|
env:
|
2021-08-21 02:15:20 +09:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|