-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #313 from k1LoW/support-windows
Support Windows
- Loading branch information
Showing
5 changed files
with
181 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: release test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- .github/workflows/release-test.yml | ||
- .goreleaser/*.yml | ||
|
||
jobs: | ||
release-test-darwin: | ||
name: Release assets test for maoOS | ||
runs-on: macos-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
cache: true | ||
|
||
- name: Run GoReleaser (dry-run) | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: --config .goreleaser/darwin.yml --clean --snapshot --skip=publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release-test-linux: | ||
name: Release assets test for Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up gcc-aarch64-linux-gnu | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-aarch64-linux-gnu | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
cache: true | ||
|
||
- name: Run GoReleaser (dry-run) | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: --config .goreleaser/linux.yml --clean --snapshot --skip=publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release-test-windows: | ||
name: Release assets test for Windows | ||
runs-on: windows-latest | ||
steps: | ||
- name: Use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
cache: true | ||
|
||
- name: Run GoReleaser (dry-run) | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: --config .goreleaser/windows.yml --clean --snapshot --skip=publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
- go mod tidy | ||
builds: | ||
- | ||
id: octocov-windows | ||
ldflags: | ||
- -s -w -X github.com/k1LoW/octocov.version={{.Version}} -X github.com/k1LoW/octocov.commit={{.FullCommit}} -X github.com/k1LoW/octocov.date={{.Date}} -X github.com/k1LoW/octocov/version.Version={{.Version}} | ||
env: | ||
- CGO_ENABLED=1 | ||
goos: | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
archives: | ||
- | ||
id: octocov-archive | ||
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- CREDITS | ||
- README.md | ||
- CHANGELOG.md | ||
checksum: | ||
name_template: 'checksums-windows.txt' | ||
snapshot: | ||
name_template: "{{ .Version }}-next" | ||
changelog: | ||
skip: true | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |