This commit is contained in:
Nite07 2024-11-20 23:01:13 +08:00
parent 2e11a13979
commit ea656745ec
3 changed files with 42 additions and 5 deletions

View File

@ -17,7 +17,7 @@ jobs:
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: | images: |
git.nite07.com/nite07/pcgamedb nite07/pcgamedb
tags: | tags: |
type=semver,pattern={{version}} type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
@ -29,12 +29,11 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Gitea - name: Login to DockerHub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.nite07.com username: ${{ secrets.DOCKERHUB_USERNAME }}
username: ${{ github.repository_owner }} password: ${{ secrets.DOCKERHUB_TOKEN }}
password: ${{ secrets.TOKEN }}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5

35
.github/workflows/release.yml vendored Executable file
View File

@ -0,0 +1,35 @@
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "stable"
- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}

View File

@ -33,3 +33,6 @@ release:
upx: upx:
- enabled: true - enabled: true
compress: best compress: best
gitea_urls:
api: https://git.nite07.com/api/v1
download: https://git.nite07.com