Skip to content

Commit

Permalink
Merge pull request #127 from Scalingo/fix/126/replace_travis
Browse files Browse the repository at this point in the history
chore: remove Travis CI
  • Loading branch information
EtienneM authored Aug 23, 2021
2 parents a78a250 + 3f6cc9c commit 5ea31c8
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 38 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish

on:
push:

jobs:
publish:
runs-on: ubuntu-latest
env:
GO_VERSION: 1.15
GOX_ARCHITECTURES: amd64 386
steps:
# Currently there is no possibility to get a tag name. Hence we filter the GITHUB_REF variable which contains something like "refs/tags/v2.0.0" if the tag is "v2.0.0". The value can be used with "steps.tag_name.outputs.TAG_NAME"
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/')
id: tag_name
run: |
echo "::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}"
echo "$TAG_NAME"
- name: Checkout the code
uses: actions/checkout@v2

- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- run: go version

- name: Execute the tests
run: go test -race -p=1 ./...

- name: Build the binaries
if: startsWith(github.ref, 'refs/tags/')
run: |
go get github.com/mitchellh/gox
go mod vendor
gox -os="linux" -arch="${{ env.GOX_ARCHITECTURES }}" -output="dist/link-${{ steps.tag_name.outputs.TAG_NAME }}-{{.OS}}-{{.Arch}}/{{.Dir}}" -ldflags="-X main.Version=${{ steps.tag_name.outputs.TAG_NAME }}" . ./cmd/...
- name: Archive the built binaries
if: startsWith(github.ref, 'refs/tags/')
run: |
for gox_archi in $GOX_ARCHITECTURES; do
echo "Archive release targetted to $gox_archi"
# Gox compiles link-client and an executable named "v2" instead of "link"..
mv dist/link-${{ steps.tag_name.outputs.TAG_NAME }}-linux-${gox_archi}/v2 dist/link-${{ steps.tag_name.outputs.TAG_NAME }}-linux-${gox_archi}/link
tar --directory=dist -czvf "dist/link-${{ steps.tag_name.outputs.TAG_NAME }}-linux-${gox_archi}.tar.gz" "link-${{ steps.tag_name.outputs.TAG_NAME }}-linux-${gox_archi}"
done
- name: Release the new version
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
body: Please refer to the [CHANGELOG.md](https://github.com/Scalingo/link/blob/${{ steps.tag_name.outputs.TAG_NAME }}/CHANGELOG.md) file.
files: dist/*.tar.gz
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

21 changes: 11 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
* chore(deps): update github.com/looplab/fsm v0.0.0-20180515091235-f980bdb68a89 => v0.3.0
* chore(deps): bump go.etcd.io to Go Module version
* chore(deps): update github.com/Scalingo/go-utils/etcd v1.0.1 => v1.1.0
* chore: replace Travis CI with GitHub Actions to release new versions

## [2021-07-30] 2.0.0
## [2021-07-30] v2.0.0

* chore(Dependabot): Update various dependencies
* Bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1
Expand All @@ -24,40 +25,40 @@
* Bad request body key is `error` instead of `msg`
* Not found body is `{"resource": "IP", "error" : "not found"}`

## [2020-11-20] 1.9.3
## [2020-11-20] v1.9.3

* Update deps: use github.com/Scalingo/go-philae/v4@v4.4.2

## [2020-11-19] 1.9.2
## [2020-11-19] v1.9.2

* Update deps: use go.etcd.io/etcd/v3 instead of github.com/coreos/etcd

## [2020-11-19] 1.9.1
## [2020-11-19] v1.9.1

* Update deps: github.com/Scalingo/go-utils, use submodules instead of global

## [2020-05-06] 1.9.0
## [2020-05-06] v1.9.0

* Use a single ETCD lease per server instead of one per IP to reduce load on the etcd cluster
* Validate the health check port value to be in the range [1:65535]

## [2020-03-06] 1.8.4
## [2020-03-06] v1.8.4

* Fix condition leading to extra lease renewal for short keepalive durations

## [2020-03-06] 1.8.3
## [2020-03-06] v1.8.3

* Make LeaseTime according to the IP KeepaliveInterval if set

## [2020-03-06] 1.8.2
## [2020-03-06] v1.8.2

* Update mocks for testing

## [2020-03-06] 1.8.1
## [2020-03-06] v1.8.1

* Update api.Client interface

## [2020-03-06] 1.8.0
## [2020-03-06] v1.8.0

* Feature: Allow the configuration of KeepaliveInterval and HealthcheckInterval by IP

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# LinK v2.0.0
[![Build Status](https://travis-ci.org/Scalingo/link.svg?branch=master)](https://travis-ci.org/Scalingo/link)

![publish workflow](https://github.com/Scalingo/link/actions/workflows/publish.yml/badge.svg)

> Link is not Keepalived
Expand Down Expand Up @@ -150,5 +151,4 @@ git add CHANGELOG.md README.md
git commit -m "Bump v2.0.0"
git tag v2.0.0
git push origin master v2.0.0
hub release create v2.0.0
```

0 comments on commit 5ea31c8

Please sign in to comment.