Skip to content

Commit

Permalink
GitHub workflow for releases (#368)
Browse files Browse the repository at this point in the history
* GitHub workflow for releases

* avoid renaming

* add workflow for tests

* fix workflow name

* one yaml for all

* fix yaml

* add missing pipe

* add conditional

* also rename that other var

* remove empty version

* print the go version

* add name to step

* add go version when building

* split files

* remove dependency

* delete travis and add badge

* CHANGE NAMES TO LOWER CASE
  • Loading branch information
marzocchi authored May 1, 2021
1 parent 941ec1f commit 16e9444
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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 ./...
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down

0 comments on commit 16e9444

Please sign in to comment.