Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows Installer Job to AppVeyor #1269

Merged
merged 10 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ environment:
GOARCH: amd64

# For release, by pushing tag
- job_name: make-release
- job_name: make-release-linux
appveyor_build_worker_image: ubuntu2004
GOARCH: amd64
- job_name: make-release-non-linux
- job_name: make-release-darwin
appveyor_build_worker_image: macos-bigsur
GOARCH: amd64
- job_name: make-release-windows
appveyor_build_worker_image: Visual Studio 2019
GOARCH: amd64

- job_name: DockerDeployMaster
appveyor_build_worker_image: ubuntu2004
Expand Down Expand Up @@ -93,28 +96,43 @@ for:
skip_non_tags: true
matrix:
only:
- job_name: make-release
- job_name: make-release-linux
install:
- sudo apt update
- sudo snap install goreleaser --classic
- make dep-github-release
build_script:
- make github-release

- # Release (Darwin / Windows)
- # Release (Darwin)
skip_non_tags: true
matrix:
only:
- job_name: make-release-non-linux
- job_name: make-release-darwin
install:
- brew install goreleaser
- brew install gh
- brew install jq
- brew install wget
build_script:
- make github-release-non-linux
- make github-release-darwin
- make mac-installer-release

- # Release (Windows)
skip_non_tags: true
matrix:
only:
- job_name: make-release-windows
install:
- ps: Invoke-WebRequest "https://github.com/goreleaser/goreleaser/releases/download/v1.8.3/goreleaser_Windows_x86_64.zip" -o goreleaser.zip
- ps: Expand-Archive goreleaser.zip
- ps: Invoke-WebRequest "https://github.com/cli/cli/releases/download/v2.13.0/gh_2.13.0_windows_amd64.zip" -o gh.zip
- ps: Expand-Archive gh.zip
- ps: choco install make
build_script:
- make github-release-windows
- make windows-installer-release

- # Docker Deploy (Master)
skip_tags: true
build: off
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ Char
releaseChangelog.md
skywire.msi
/scripts/win_installer/build/
goreleaser*
gh*
67 changes: 2 additions & 65 deletions .goreleaser.yml → .goreleaser-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ release:
owner: skycoin
name: skywire

draft: true
prerelease: true

before:
hooks:
Expand All @@ -19,14 +19,9 @@ builds:
binary: skywire-visor
goos:
- darwin
- windows
goarch:
- arm64
- amd64
- 386
ignore:
- goos: windows
goarch: arm64
tags:
- systray
env:
Expand All @@ -38,16 +33,9 @@ builds:
binary: skywire-cli
goos:
- darwin
- windows
goarch:
- arm64
- amd64
- 386
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: arm64
env:
- CGO_ENABLED=0
main: ./cmd/skywire-cli/
Expand All @@ -57,16 +45,9 @@ builds:
binary: apps/skychat
goos:
- darwin
- windows
goarch:
- arm64
- amd64
- 386
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: arm64
env:
- CGO_ENABLED=0
main: ./cmd/apps/skychat/
Expand All @@ -76,16 +57,9 @@ builds:
binary: apps/skysocks
goos:
- darwin
- windows
goarch:
- arm64
- amd64
- 386
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: arm64
env:
- CGO_ENABLED=0
main: ./cmd/apps/skysocks/
Expand All @@ -95,66 +69,30 @@ builds:
binary: apps/skysocks-client
goos:
- darwin
- windows
goarch:
- arm64
- amd64
- 386
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: arm64
env:
- CGO_ENABLED=0
main: ./cmd/apps/skysocks-client/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: vpn-server
binary: apps/vpn-server
goos:
- darwin
- windows
goarch:
- arm64
- amd64
- 386
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: arm64
env:
- CGO_ENABLED=0
main: ./cmd/apps/vpn-server/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: vpn-client
binary: apps/vpn-client
goos:
- darwin
- windows
goarch:
- arm64
- amd64
- 386
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: arm64
env:
- CGO_ENABLED=0
main: ./cmd/apps/vpn-client/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

archives:
- id: darwin-windows
- id: archive
format: tar.gz
wrap_in_directory: false
format_overrides:
- goos: windows
format: zip
name_template: 'skywire-systray-v{{ .Version }}-{{ .Os }}-{{ .Arch }}'
files:
- dmsghttp-config.json
Expand All @@ -164,7 +102,6 @@ archives:
- skysocks
- skysocks-client
- skychat
- vpn-server
- vpn-client
allow_different_binary_count: true

Expand Down
78 changes: 78 additions & 0 deletions .goreleaser-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com

release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL or empty if its private hosted.
# Note: it can only be one: either github or gitlab or gitea
github:
owner: skycoin
name: skywire

prerelease: true

before:
hooks:
- go mod tidy
builds:
- id: skywire-visor
binary: skywire-visor
goos:
- windows
goarch:
- amd64
- 386
tags:
- systray
env:
- CGO_ENABLED=1
main: ./cmd/skywire-visor/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}

- id: skywire-cli
binary: skywire-cli
goos:
- windows
goarch:
- amd64
- 386
env:
- CGO_ENABLED=0
main: ./cmd/skywire-cli/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: vpn-client
binary: apps/vpn-client
goos:
- windows
goarch:
- amd64
- 386
env:
- CGO_ENABLED=0
main: ./cmd/apps/vpn-client/
ldflags: -s -w -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

archives:
- id: archive
format: zip
wrap_in_directory: false
name_template: 'skywire-systray-v{{ .Version }}-{{ .Os }}-{{ .Arch }}'
files:
- dmsghttp-config.json
builds:
- skywire-visor
- skywire-cli
- vpn-client
allow_different_binary_count: true

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `skywire-cli dmsgpty start <pk>` to connect through dmsgpty to remote visor
- `make win-installer-latest` to create installer for latest version of released, not pre-release.
- `trace` log level is added
- `--log-lever` flag to generate and update config by `skywire-cli`
- `--log-level` flag to generate and update config by `skywire-cli`

## 0.6.0

Expand Down
24 changes: 20 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -270,20 +270,30 @@ github-release:
sed '/^## ${GITHUB_TAG}$$/,/^## .*/!d;//d;/^$$/d' ./CHANGELOG.md > releaseChangelog.md
goreleaser --rm-dist --config .goreleaser-linux.yml --release-notes releaseChangelog.md

github-release-non-linux:
goreleaser --rm-dist --skip-publish
github-release-darwin:
goreleaser --rm-dist --config .goreleaser-darwin.yml --skip-publish
$(eval GITHUB_TAG=$(shell git describe --abbrev=0 --tags))
$(eval $(shell echo ${GITHUB_TOKEN} > ../token))
$(eval export GITHUB_TOKEN=)
gh auth login --with-token < ../token
gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-systray-${GITHUB_TAG}-darwin-amd64.tar.gz
gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-systray-${GITHUB_TAG}-darwin-arm64.tar.gz
gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-systray-${GITHUB_TAG}-windows-amd64.zip
gh release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-systray-${GITHUB_TAG}-windows-386.zip
gh release download ${GITHUB_TAG} --repo skycoin/skywire --pattern 'checksums*'
cat ./dist/checksums.txt >> ./checksums.txt
gh release upload --repo skycoin/skywire ${GITHUB_TAG} --clobber ./checksums.txt

github-release-windows:
.\goreleaser\goreleaser.exe --rm-dist --config .goreleaser-windows.yml --skip-publish
$(eval GITHUB_TAG=$(shell powershell git describe --abbrev=0 --tags))
$(eval $(shell echo $(GITHUB_TOKEN) > ../token))
$(eval export GITHUB_TOKEN=)
cat ../token | ./gh/bin/gh.exe auth login --with-token
./gh/bin/gh.exe release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-systray-${GITHUB_TAG}-windows-amd64.zip
./gh/bin/gh.exe release upload --repo skycoin/skywire ${GITHUB_TAG} ./dist/skywire-systray-${GITHUB_TAG}-windows-386.zip
./gh/bin/gh.exe release download ${GITHUB_TAG} --repo skycoin/skywire --pattern 'checksums*'
cat ./dist/checksums.txt >> ./checksums.txt
./gh/bin/gh.exe release upload --repo skycoin/skywire ${GITHUB_TAG} --clobber ./checksums.txt

dep-github-release:
wget -c https://more.musl.cc/10/x86_64-linux-musl/aarch64-linux-musl-cross.tgz -O ../aarch64-linux-musl-cross.tgz
tar -xzf ../aarch64-linux-musl-cross.tgz -C ../
Expand Down Expand Up @@ -404,6 +414,12 @@ win-installer-latest:
win-installer:
@powershell '.\scripts\win_installer\script.ps1 $(CUSTOM_VERSION)'

windows-installer-release:
$(eval GITHUB_TAG=$(shell git describe --abbrev=0 --tags))
make win-installer CUSTOM_VERSION=$(GITHUB_TAG)
./gh/bin/gh.exe release upload --repo skycoin/skywire ${GITHUB_TAG} ./skywire-installer-${GITHUB_TAG}-windows-amd64.msi
./gh/bin/gh.exe release upload --repo skycoin/skywire ${GITHUB_TAG} ./skywire-installer-${GITHUB_TAG}-windows-386.msi

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

Expand Down
Loading