Skip to content

Commit

Permalink
test new release
Browse files Browse the repository at this point in the history
  • Loading branch information
name committed May 30, 2023
1 parent a09be26 commit 36b8881
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/onTag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ jobs:
- uses: actions/checkout@v2
- name: Set release name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: "Build & export"
run: |
make release
- name: "Build for linux"
run: make release-lin
- name: "Build for windows"
run: make release-win
- name: "Build for macos"
run: "make release-mac"
- uses: ncipollo/release-action@v1
with:
artifacts: "build/framed"
artifacts: "build/*"
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@ GO_VERSION := 1.20.4
build-docker:
docker build -t mactat/framed -f ./dockerfiles/dev.dockerfile .

.PHONY: release
release:
.PHONY: release-lin
release-lin:
docker run --rm -v $(ROOT):/app golang:$(GO_VERSION)-alpine3.18 /bin/sh -c "cd /app && go build -o ./build/framed ./main.go"
sudo chown -R $(USER):$(USER) ./build

# make release for windows
.PHONY: release-win
release-win:
docker run --rm -v $(ROOT):/app golang:$(GO_VERSION)-alpine3.18 /bin/sh -c "cd /app && GOOS=windows GOARCH=amd64 go build -o ./build/framed.exe ./main.go"
sudo chown -R $(USER):$(USER) ./build

# make release for mac
.PHONY: release-mac
release-mac:
docker run --rm -v $(ROOT):/app golang:$(GO_VERSION)-alpine3.18 /bin/sh -c "cd /app && GOOS=darwin GOARCH=amd64 go build -o ./build/framed ./main.go"
sudo chown -R $(USER):$(USER) ./build

.PHONY: build
build:
go build -o ./build/framed ./main.go
Expand Down

0 comments on commit 36b8881

Please sign in to comment.