diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c274cb4b02f427ee97f8dd422e18ff072c3452b1..ed5e12f3c7add0adcd95f7e4568d57bc5cdfbd36 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,9 +26,7 @@ jobs: release: runs-on: ubuntu-20.04 needs: [ lint, build ] - if: | - ${{ startsWith(github.ref, 'refs/tags/') && - contains(['mxschmitt', 'JonasProgrammer'], github.actor) }} + if: ${{ startsWith(github.ref, 'refs/tags/') && contains(fromJSON('["mxschmitt", "JonasProgrammer"]'), github.actor) }} steps: - uses: actions/checkout@v2 - name: Run GoReleaser diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d0b4fefa2ce827705051dec719434032b0442179..0000000000000000000000000000000000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Builds the docker-machine-driver-hetzner and releases it, if the build is a tag -# (due to the deploy.on.tags=true below). -# -# To make it work, create and encrypt an OAuth token for the Github API as follows: -# (1) Go to https://github.com/settings/tokens and create a new private token -# with scope "public_repo". -# (2) Convert the token into a Travis secret as described at -# https://docs.travis-ci.com/user/encryption-keys/: -# * (assuming you are on a shell with the current working directory being -# inside a local working copy of your Github project) -# * gem install travis -# * travis encypt <the token created in step (1)> -# * add the secure: "<encrypted token>" to the travis.yml file as a key -# below the api_key -language: go -go: - - stable -env: - global: - - GO111MODULE=on - - CGO_ENABLED=0 - -before_deploy: - # Create binaries for many OSs and architures as tarballs. - # the -osarch="!a/b !c/d" option is used to exclude OS-arch pairs - # a/b and c/d from the build. OS-arch pairs might e.g. be excluded - # they failed to build. - - go get github.com/mitchellh/gox - - mkdir releases - - gox -osarch='!netbsd/arm !openbsd/386 !openbsd/amd64 !netbsd/386 !netbsd/amd64 !darwin/386' -output="releases/{{.Dir}}_`git describe --tags --abbrev=0`_{{.OS}}_{{.Arch}}/{{.Dir}}" -ldflags "-X main.Version=`git describe --tags --abbrev=0`" - # Loop through the built architecture directories and create their corresponding tar.gz archives with the binary in it. - - find releases -maxdepth 2 -mindepth 2 -type f -exec bash -c 'tar -cvzf "$(dirname {}).tar.gz" -C "$(dirname {})" $(basename {})' \; - -deploy: - # See https://docs.travis-ci.com/user/deployment/releases/ - provider: releases - api_key: - secure: "Hnpq64pZL+CFaaqjQfxdAHWK3Hk+9F6CgzjaIo3K9puNAySsA1XVQHsqCV4P9v6hE5o3TjgQJZwpqLN/h53JPeZ1xwybj6sVyWwzQzNr99QGJH6Pr7g3mgVIIHyzy+4VqQ9Kw9PoNZEnq3y7wupNCjI+vN6WYWT9+gpMr4CsMyn3KEnpGREGgg964wMrBTdYoQxgNGLJtAkYwnHdYyVQaEA/9KZZUFhU8JwF0RzkBcXwgOzt9UhR9R7WgA+N2yLDFjlhmRtyTYsd2/4PX2FcsoEdUAAQBMBgw1fzBaIbUuhpT2/iNhQGs+ln/DHFPb5mUzG+JKDPEfdAAcT+h4tmIeND8gmKIspMAKsqXXZxkmi4PjobLE+rG0cUkMmnP879+ECB0buH4L8Aaxae0dMeURLxxfWhr7ytR4P93uC8KcSXrzXkx1BgqT6BasTxrxvdQQJUOCYtdWKV3w+ZsVi9YSvIoQTEL7Hy0F120mWTLYDtqtGr+VjdptUAwIi/ft8vniRimTV582Ry3v2gIstt9Wauyou8O+SA85wqpxCFJZNWX/2z8PhpHF02658ZLWpycHfwRjILwHl1c6THIyA56IZffj+8Y0yntbsFBm5nnrgGaStH/ln/N/ykWy80QzZlLfSZ2AkBC0m1qctebixmE4ekR+rF/z1mCIcRhrTaErM=" - file_glob: true # enables wildcards in file names - file: "releases/*.tar.gz" - skip_cleanup: true - on: - tags: true