Skip to content

Commit 030a976

Browse files
committed
fix ci
1 parent 2afc05e commit 030a976

File tree

1 file changed

+58
-66
lines changed

1 file changed

+58
-66
lines changed

.github/workflows/release.yml

Lines changed: 58 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,66 @@ on:
88
types: [published]
99

1010
jobs:
11-
build:
12-
name: Build for ${{ matrix.os }} (${{ matrix.arch }})
13-
runs-on: ubuntu-latest
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
os: [linux, darwin, windows] # freebsd
18-
arch: [amd64, arm64] # 386
19-
steps:
20-
- uses: actions/checkout@v4
21-
- {uses: actions/setup-go@v5, with: {go-version-file: go.mod}}
22-
- {uses: gacts/github-slug@v1, id: slug}
23-
- id: values
24-
run: echo "binary-name=error-pages-${{ matrix.os }}-${{ matrix.arch }}`[ ${{ matrix.os }} = 'windows' ] && echo '.exe'`" >> $GITHUB_OUTPUT
25-
- env:
26-
GOOS: ${{ matrix.os }}
27-
GOARCH: ${{ matrix.arch }}
28-
CGO_ENABLED: 0
29-
LDFLAGS: -s -w -X gh.tarampamp.am/error-pages/internal/version.version=${{ steps.slug.outputs.version }}
30-
run: go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/error-pages/
31-
- uses: svenstaro/upload-release-action@v2
32-
with:
33-
repo_token: ${{ secrets.GITHUB_TOKEN }}
34-
file: ${{ steps.values.outputs.binary-name }}
35-
asset_name: ${{ steps.values.outputs.binary-name }}
36-
tag: ${{ github.ref }}
11+
# build:
12+
# name: Build for ${{ matrix.os }} (${{ matrix.arch }})
13+
# runs-on: ubuntu-latest
14+
# strategy:
15+
# fail-fast: false
16+
# matrix:
17+
# os: [linux, darwin, windows] # freebsd
18+
# arch: [amd64, arm64] # 386
19+
# steps:
20+
# - uses: actions/checkout@v4
21+
# - {uses: actions/setup-go@v5, with: {go-version-file: go.mod}}
22+
# - {uses: gacts/github-slug@v1, id: slug}
23+
# - id: values
24+
# run: echo "binary-name=error-pages-${{ matrix.os }}-${{ matrix.arch }}`[ ${{ matrix.os }} = 'windows' ] && echo '.exe'`" >> $GITHUB_OUTPUT
25+
# - env:
26+
# GOOS: ${{ matrix.os }}
27+
# GOARCH: ${{ matrix.arch }}
28+
# CGO_ENABLED: 0
29+
# LDFLAGS: -s -w -X gh.tarampamp.am/error-pages/internal/version.version=${{ steps.slug.outputs.version }}
30+
# run: go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/error-pages/
31+
# - uses: svenstaro/upload-release-action@v2
32+
# with:
33+
# repo_token: ${{ secrets.GITHUB_TOKEN }}
34+
# file: ${{ steps.values.outputs.binary-name }}
35+
# asset_name: ${{ steps.values.outputs.binary-name }}
36+
# tag: ${{ github.ref }}
3737

38-
- if: matrix.os == 'linux' && matrix.arch == 'amd64'
39-
run: mkdir ./out && ./${{ steps.values.outputs.binary-name }} build --index --disable-minification --target-dir ./out
40-
- if: matrix.os == 'linux' && matrix.arch == 'amd64'
41-
uses: actions/upload-artifact@v4
42-
with:
43-
name: error-pages-static
44-
path: out/
45-
if-no-files-found: error
46-
retention-days: 1
47-
- if: matrix.os == 'linux' && matrix.arch == 'amd64'
48-
working-directory: ./out
49-
run: zip -r ./../templates.zip .
50-
- if: matrix.os == 'linux' && matrix.arch == 'amd64'
51-
uses: svenstaro/upload-release-action@v2
52-
with:
53-
repo_token: ${{ secrets.GITHUB_TOKEN }}
54-
file: templates.zip
55-
asset_name: error-pages-static.zip
56-
tag: ${{ github.ref }}
38+
# - if: matrix.os == 'linux' && matrix.arch == 'amd64'
39+
# run: mkdir ./out && ./${{ steps.values.outputs.binary-name }} build --index --disable-minification --target-dir ./out
40+
# - if: matrix.os == 'linux' && matrix.arch == 'amd64'
41+
# uses: actions/upload-artifact@v4
42+
# with:
43+
# name: error-pages-static
44+
# path: out/
45+
# if-no-files-found: error
46+
# retention-days: 1
47+
# - if: matrix.os == 'linux' && matrix.arch == 'amd64'
48+
# working-directory: ./out
49+
# run: zip -r ./../templates.zip .
50+
# - if: matrix.os == 'linux' && matrix.arch == 'amd64'
51+
# uses: svenstaro/upload-release-action@v2
52+
# with:
53+
# repo_token: ${{ secrets.GITHUB_TOKEN }}
54+
# file: templates.zip
55+
# asset_name: error-pages-static.zip
56+
# tag: ${{ github.ref }}
5757

58-
demo:
59-
name: Update the demo (GitHub Pages)
60-
runs-on: ubuntu-latest
61-
needs: [build]
62-
steps:
63-
- uses: actions/download-artifact@v4
64-
with:
65-
name: error-pages-static
66-
path: .artifact
67-
- uses: peaceiris/actions-gh-pages@v4
68-
with:
69-
github_token: ${{ secrets.GITHUB_TOKEN }}
70-
publish_dir: ./.artifact
58+
# demo:
59+
# name: Update the demo (GitHub Pages)
60+
# runs-on: ubuntu-latest
61+
# needs: [build]
62+
# steps:
63+
# - uses: actions/download-artifact@v4
64+
# with:
65+
# name: error-pages-static
66+
# path: .artifact
67+
# - uses: peaceiris/actions-gh-pages@v4
68+
# with:
69+
# github_token: ${{ secrets.GITHUB_TOKEN }}
70+
# publish_dir: ./.artifact
7171

7272
docker-image:
7373
name: Build the docker image
@@ -77,10 +77,6 @@ jobs:
7777
- {uses: gacts/github-slug@v1, id: slug}
7878
- uses: docker/setup-qemu-action@v3
7979
- uses: docker/setup-buildx-action@v3
80-
- uses: docker/login-action@v3
81-
with:
82-
username: ${{ secrets.DOCKER_LOGIN }}
83-
password: ${{ secrets.DOCKER_PASSWORD }}
8480
- uses: docker/login-action@v3
8581
with:
8682
registry: ghcr.io
@@ -94,10 +90,6 @@ jobs:
9490
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
9591
build-args: "APP_VERSION=${{ steps.slug.outputs.version }}"
9692
tags: |
97-
tarampampam/error-pages:latest
98-
tarampampam/error-pages:${{ steps.slug.outputs.version }}
99-
tarampampam/error-pages:${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}
100-
tarampampam/error-pages:${{ steps.slug.outputs.version-major }}
10193
ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:latest
10294
ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:${{ steps.slug.outputs.version }}
10395
ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}:${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}

0 commit comments

Comments
 (0)