1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Add release CI

This commit is contained in:
Maksym Pavlenko
2020-04-13 17:33:03 -07:00
parent d6e8a221de
commit ac8a889ddb
3 changed files with 40 additions and 16 deletions

38
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Required for the changelog to work correctly
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- name: Docker login
env:
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login --username "$DOCKER_LOGIN" --password "$DOCKER_PASSWORD"
- name: Release
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

View File

@ -20,18 +20,6 @@ docker:
docker build -t mxpv/podsync:unstable .
docker push mxpv/podsync:unstable
#
# Run goreleaser to build and upload release binaries
#
V =
.PHONY: release
release:
test -n "$(V)" # Version is required
- git tag --delete v$(V)
git tag v$(V)
goreleaser --rm-dist
git push origin --tags
#
# Pull GolangCI-Lint dependency
#

View File

@ -157,7 +157,5 @@ $ docker-compose up
## How to make a release
Just run:
```
$ make release V=2.0.7
```
Just push a git tag. CI will do the rest.