diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 26cf5c9..207df09 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -17,7 +17,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - git.nite07.com/nite07/pcgamedb + nite07/pcgamedb tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} @@ -29,12 +29,11 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to Gitea + - name: Login to DockerHub uses: docker/login-action@v3 with: - registry: git.nite07.com - username: ${{ github.repository_owner }} - password: ${{ secrets.TOKEN }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100755 index 0000000..77d6938 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e8a404c..b060122 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -33,3 +33,6 @@ release: upx: - enabled: true compress: best +gitea_urls: + api: https://git.nite07.com/api/v1 + download: https://git.nite07.com