diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 5d9807c3..537debd6 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -1,4 +1,4 @@ -name: Deploy multi-architecture Docker images for transfer.sh with buildx +name: deploy multi-architecture Docker images for transfer.sh with buildx on: schedule: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..505e465e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,58 @@ +name: release +on: + push: + tags: + - v* +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + GOOS: [ darwin, linux, windows ] + GOARCH: [ amd64 ] + include: + - GOOS: darwin + GOARCH: amd64 + suffix: darwin-amd64 + - GOOS: windows + GOARCH: amd64 + suffix: windows-amd64.exe + - GOOS: linux + GOARCH: amd64 + suffix: linux-amd64 + - GOOS: linux + GOARCH: arm + suffix: linux-armv7 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.16.x + - name: Build ${{ matrix.suffix }} (GOOS=${{ matrix.GOOS }}, GOARCH=${{ matrix.GOARCH }}) + env: + GOOS: ${{ matrix.GOOS }} + GOARCH: ${{ matrix.GOARCH }} + run: | + go version + go build -o ./artifacts/transfersh-${GITHUB_REF##*/}-${{ matrix.suffix }} + - uses: actions/upload-artifact@v2 + name: Upload artifacts + with: + name: artifacts + path: ./artifacts + + release: + runs-on: ubuntu-latest + needs: [ build ] + steps: + - uses: actions/download-artifact@v2 + name: Download artifacts + with: + name: artifacts + path: ./artifacts + - name: Publish artifacts + uses: softprops/action-gh-release@v1 + with: + files: './artifacts/*' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..ffb5240f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: test +on: + push: + branches: + - "*" +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go_version: + - 1.13.x + - 1.14.x + - 1.15.x + - 1.16.x + name: Test with ${{ matrix.go_version }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go_version }} + - name: Vet and test + run: | + go version + go vet ./... + go test ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 33724d38..00000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: go -sudo: false - -os: - - linux - -services: - - docker - -go: - - 1.13.x - - 1.14.x - - 1.15.x - - 1.16.x - - tip - -env: - global: - - GO111MODULE=on - -install: - - go get -t -u -v ./... - - go build -v . - - go vet ./... - -script: - - go test ./... - -before_deploy: - - mkdir -p release - - "GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -tags netgo -ldflags '-a -s -w -extldflags -static' -o release/transfersh-$TRAVIS_TAG-linux-amd64" - - "GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=0 go build -tags netgo -ldflags '-a -s -w -extldflags -static' -o release/transfersh-$TRAVIS_TAG-linux-armv7" - - "GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -tags netgo -ldflags '-a -s -w -extldflags -static' -o release/transfersh-$TRAVIS_TAG-darwin-amd64" - - "GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -tags netgo -ldflags '-a -s -w -extldflags -static' -o release/transfersh-$TRAVIS_TAG-win-amd64.exe" - -deploy: - provider: releases - api_key: - secure: cOuMGyvrl/9GX3TZFL+Vq++2Bv5Hlb3VfXSYONfeAj+1AXI3Y+tPruy/XnWpa1MUxkvFuIhea3sUAiKfwhHip9csCmMUhDJtaTU9apsxRkyF/OFrWb7/FlbnqYuAwnp91ImvtSlnubg2VHTjhBA6ycNQF7WZcJEMVMsAtC/nSY4= - file: - - "release/transfersh-$TRAVIS_TAG-linux-amd64" - - "release/transfersh-$TRAVIS_TAG-linux-armv7" - - "release/transfersh-$TRAVIS_TAG-darwin-amd64" - - "release/transfersh-$TRAVIS_TAG-win-amd64.exe" - skip_cleanup: true - on: - tags: true - go: 1.15.x - overwrite: true diff --git a/README.md b/README.md index 2efa93ef..7bdf4fd4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# transfer.sh [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dutchcoders/transfer.sh?utm_source=badge&utm_medium=badge&utm_campaign=&utm_campaign=pr-badge&utm_content=badge) [![Go Report Card](https://goreportcard.com/badge/github.com/dutchcoders/transfer.sh)](https://goreportcard.com/report/github.com/dutchcoders/transfer.sh) [![Docker pulls](https://img.shields.io/docker/pulls/dutchcoders/transfer.sh.svg)](https://hub.docker.com/r/dutchcoders/transfer.sh/) [![Build Status](https://travis-ci.com/dutchcoders/transfer.sh.svg?branch=master)](https://travis-ci.com/dutchcoders/transfer.sh) +# transfer.sh [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dutchcoders/transfer.sh?utm_source=badge&utm_medium=badge&utm_campaign=&utm_campaign=pr-badge&utm_content=badge) [![Go Report Card](https://goreportcard.com/badge/github.com/dutchcoders/transfer.sh)](https://goreportcard.com/report/github.com/dutchcoders/transfer.sh) [![Docker pulls](https://img.shields.io/docker/pulls/dutchcoders/transfer.sh.svg)](https://hub.docker.com/r/dutchcoders/transfer.sh/) [![Build Status](https://github.com/dutchcoders/transfer.sh/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/dutchcoders/transfer.sh/actions/workflows/test.yml?query=branch%3Amaster) Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.