mirror of
https://github.com/coder/coder.git
synced 2026-06-06 06:28:20 +00:00
4c35b8174a
This fixes paths not resolving in macOS, causing the build target to fail. This also renames the site target to specify the index.html, which is the output artifact of building the site.
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
name: release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: "~1.18"
|
|
|
|
- name: Install Gon
|
|
run: |
|
|
brew tap mitchellh/gon
|
|
brew install mitchellh/gon/gon
|
|
|
|
- name: Import Signing Certificates
|
|
uses: Apple-Actions/import-codesign-certs@v1
|
|
with:
|
|
p12-file-base64: ${{ secrets.AC_CERTIFICATE_P12_BASE64 }}
|
|
p12-password: ${{ secrets.AC_CERTIFICATE_PASSWORD }}
|
|
|
|
- name: Echo Go Cache Paths
|
|
id: go-cache-paths
|
|
run: |
|
|
echo "::set-output name=go-build::$(go env GOCACHE)"
|
|
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
|
|
|
- name: Go Build Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
|
key: ${{ runner.os }}-release-go-build-${{ hashFiles('**/go.sum') }}
|
|
|
|
- name: Go Mod Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
|
key: ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
|
|
|
|
- name: Cache Node
|
|
id: cache-node
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
**/node_modules
|
|
.eslintcache
|
|
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
js-${{ runner.os }}-
|
|
|
|
- name: Install make
|
|
run: brew install make
|
|
|
|
- name: Build Site
|
|
run: make site/out/index.html
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2.9.1
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
AC_USERNAME: ${{ secrets.AC_USERNAME }}
|
|
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
|