Skip to content

Commit 2996ed7

Browse files
committed
Configure release.yml to build web
Remove web building from goreleaser
1 parent 4de0966 commit 2996ed7

3 files changed

Lines changed: 23 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ jobs:
3333
cache: "yarn"
3434
cache-dependency-path: ./web/yarn.lock
3535

36+
- name: Install web
37+
run: yarn install
38+
working-directory: ./web
39+
40+
- name: Build web with Yarn
41+
run: yarn build
42+
working-directory: ./web
43+
3644
- name: Set up Go
3745
uses: actions/setup-go@v4
3846
with:

.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ release:
22
target_commitish: '{{ .Commit }}'
33
before:
44
hooks:
5-
- yarn -v # For debugging. Historical problems with running 1.x yarn. Need >=3.x yarn (berry)
6-
- yarn --cwd web build
5+
# - yarn -v # For debugging. Historical problems with running 1.x yarn. Need >=3.x yarn (berry)
6+
# - yarn --cwd web build # Performed via CI in the GitHub Action release.yml, or manually during a manual release (see README.md)
77
- go mod tidy
88
builds:
99
- env:

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,19 @@ Take a look at [an example logstation.conf here](logstation.default.conf).
3737

3838
logstation uses [goreleaser](https://github.com/goreleaser/goreleaser) for all releases
3939

40-
To build all targets locally you can run
41-
`goreleaser build --snapshot --clean`
40+
Start by building the web frontend:
41+
* `cd web; yarn build`
42+
43+
To build all targets locally you can run the following in the root directory:
44+
45+
* `goreleaser build --snapshot --clean`
4246

4347
If you want to build for a specific target you can set environment variables
44-
In powershell this would look like:
45-
`$env:GOOS="linux"; $env:GOARCH="amd64"; goreleaser build --snapshot --clean --single-target`
48+
* In bash this would look like:
49+
`GOOS=linux GOARCH=amd64 goreleaser build --snapshot --clean --single-target`
50+
* In powershell this would look like:
51+
`$env:GOOS="linux"; $env:GOARCH="amd64"; goreleaser build --snapshot --clean --single-target`
52+
4653

4754
Reference the [releases](https://github.com/jdrews/logstation/releases) and [.goreleaser.yaml](.goreleaser.yaml) for all officially supported targets.
4855

@@ -53,7 +60,8 @@ Reference the [releases](https://github.com/jdrews/logstation/releases) and [.go
5360
* `git push origin 2.0.0-beta1`
5461
* Ensure you have an environment variable with `GITHUB_TOKEN="YOUR_GH_TOKEN"` and minimum of `write:packages` permissions
5562
* Release!
56-
* `goreleaser release`
63+
* `cd web; yarn build`
64+
* `cd ..; goreleaser release`
5765
* Read the [goreleaser quickstart](https://goreleaser.com/quick-start/) for more details
5866

5967
### Versions ###

0 commit comments

Comments
 (0)