mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
wip: 🔕 temporary commit
This commit is contained in:
parent
75476a22c0
commit
6766f3f787
72
.github/workflows/release.yml
vendored
72
.github/workflows/release.yml
vendored
@ -8,48 +8,42 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wip:
|
build:
|
||||||
|
name: Build for ${{ matrix.os }} (${{ matrix.arch }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [linux, darwin] # linux, freebsd, darwin, windows
|
||||||
|
arch: [amd64] # amd64, 386
|
||||||
steps:
|
steps:
|
||||||
- run: echo WIP
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: gacts/setup-go-with-cache@v1
|
||||||
|
with: {go-version-file: go.mod}
|
||||||
|
|
||||||
|
- {uses: gacts/github-slug@v1, id: slug}
|
||||||
|
|
||||||
|
- name: Generate builder values
|
||||||
|
id: values
|
||||||
|
run: echo "binary-name=error-pages-${{ matrix.os }}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build application
|
||||||
|
env:
|
||||||
|
GOOS: ${{ matrix.os }}
|
||||||
|
GOARCH: ${{ matrix.arch }}
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
LDFLAGS: -s -w -X gh.tarampamp.am/error-pages/internal/version.version=${{ steps.slug.outputs.version }}
|
||||||
|
run: go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/error-pages/
|
||||||
|
|
||||||
|
- name: Upload binary file to release
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ${{ steps.values.outputs.binary-name }}
|
||||||
|
asset_name: ${{ steps.values.outputs.binary-name }}
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
|
||||||
#jobs:
|
|
||||||
# build:
|
|
||||||
# name: Build for ${{ matrix.os }} (${{ matrix.arch }})
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# strategy:
|
|
||||||
# fail-fast: false
|
|
||||||
# matrix:
|
|
||||||
# os: [linux, darwin] # linux, freebsd, darwin, windows
|
|
||||||
# arch: [amd64] # amd64, 386
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v4
|
|
||||||
#
|
|
||||||
# - uses: gacts/setup-go-with-cache@v1
|
|
||||||
# with: {go-version-file: go.mod}
|
|
||||||
#
|
|
||||||
# - {uses: gacts/github-slug@v1, id: slug}
|
|
||||||
#
|
|
||||||
# - name: Generate builder values
|
|
||||||
# id: values
|
|
||||||
# run: echo "binary-name=error-pages-${{ matrix.os }}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
|
|
||||||
#
|
|
||||||
# - name: Build application
|
|
||||||
# env:
|
|
||||||
# GOOS: ${{ matrix.os }}
|
|
||||||
# GOARCH: ${{ matrix.arch }}
|
|
||||||
# CGO_ENABLED: 0
|
|
||||||
# LDFLAGS: -s -w -X gh.tarampamp.am/error-pages/internal/version.version=${{ steps.slug.outputs.version }}
|
|
||||||
# run: go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/error-pages/
|
|
||||||
#
|
|
||||||
# - name: Upload binary file to release
|
|
||||||
# uses: svenstaro/upload-release-action@v2
|
|
||||||
# with:
|
|
||||||
# repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# file: ${{ steps.values.outputs.binary-name }}
|
|
||||||
# asset_name: ${{ steps.values.outputs.binary-name }}
|
|
||||||
# tag: ${{ github.ref }}
|
|
||||||
#
|
|
||||||
# docker-image:
|
# docker-image:
|
||||||
# name: Build docker image
|
# name: Build docker image
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
|
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
@ -58,9 +58,11 @@ jobs:
|
|||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
LDFLAGS: -s -w -X gh.tarampamp.am/error-pages/internal/appmeta.version=${{ steps.slug.outputs.commit-hash-short }}
|
LDFLAGS: -s -w -X gh.tarampamp.am/error-pages/internal/appmeta.version=${{ steps.slug.outputs.commit-hash-short }}
|
||||||
run: go build -trimpath -ldflags "$LDFLAGS" -o ./error-pages ./cmd/error-pages/
|
run: go build -trimpath -ldflags "$LDFLAGS" -o ./error-pages ./cmd/error-pages/
|
||||||
- {if: matrix.os == 'linux', run: ./error-pages --version && ./error-pages -h}
|
- if: matrix.os == 'linux' && matrix.arch == 'amd64'
|
||||||
- {if: matrix.os == 'linux', run: mkdir ./out && ./error-pages --log-level=debug build --index --target-dir ./out}
|
run: ./error-pages --version && ./error-pages -h
|
||||||
- if: matrix.os == 'linux'
|
- if: matrix.os == 'linux' && matrix.arch == 'amd64'
|
||||||
|
run: mkdir ./out && ./error-pages --log-level=debug build --index --target-dir ./out
|
||||||
|
- if: matrix.os == 'linux' && matrix.arch == 'amd64'
|
||||||
run: |
|
run: |
|
||||||
test -f ./out/index.html
|
test -f ./out/index.html
|
||||||
test -f ./out/ghost/404.html
|
test -f ./out/ghost/404.html
|
||||||
|
Loading…
Reference in New Issue
Block a user