Skip to content

Commit

Permalink
releaser fix and action upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Jan 22, 2024
1 parent de570e8 commit 148e1d5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 34 deletions.
48 changes: 19 additions & 29 deletions .github/workflows/coveritup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ jobs:
with:
mysql-version: "8.0"

- name: Build Dist for Embed
working-directory: app/frontend
run: |
npm install
npm run build
- name: test
working-directory: app
run: |
go mod tidy
go test ./... -count=1
- name: NPM Install
working-directory: app/frontend
run: |
Expand All @@ -67,25 +56,26 @@ jobs:
with:
type: npm-install-time

# - name: NPM Build
# working-directory: app/frontend
# run: |
# START=$SECONDS
# npm run build
# echo SCORE=$(($SECONDS-START)) >> "$GITHUB_ENV"
# - uses: kevincobain2000/action-coveritup@v1
# with:
# type: npm-build-time
- name: NPM Build
working-directory: app/frontend
run: |
START=$SECONDS
npm run build
echo SCORE=$(($SECONDS-START)) >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: npm-build-time

# - name: Go Build
# working-directory: app
# run: |
# START=$SECONDS
# go build -ldflags '-s -w' -o main main.go
# echo SCORE=$(($SECONDS-START)) >> "$GITHUB_ENV"
# - uses: kevincobain2000/action-coveritup@v1
# with:
# type: go-build-time
- name: Go Build
working-directory: app
run: |
START=$SECONDS
go mod tidy
go build -ldflags '-s -w' -o main main.go
echo SCORE=$(($SECONDS-START)) >> "$GITHUB_ENV"
- uses: kevincobain2000/action-coveritup@v1
with:
type: go-build-time

# - name: Test
# working-directory: app
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ jobs:
echo "You are running MIT License version" > dist/index.html
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v5
with:
workdir: app
distribution: goreleaser
version: latest
args: release --clean --skip=validate
Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yaml → app/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
before:
hooks:
- go mod tidy
builds:
-
main: main.go
dir: app
hooks:
pre: go mod tidy
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
# - windows
# - freebsd
- freebsd
goarch:
- amd64
- arm64
Expand Down

0 comments on commit 148e1d5

Please sign in to comment.