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:
38
.github/workflows/release.yml
vendored
Normal file
38
.github/workflows/release.yml
vendored
Normal 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 }}
|
12
Makefile
12
Makefile
@ -20,18 +20,6 @@ docker:
|
|||||||
docker build -t mxpv/podsync:unstable .
|
docker build -t mxpv/podsync:unstable .
|
||||||
docker push 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
|
# Pull GolangCI-Lint dependency
|
||||||
#
|
#
|
||||||
|
@ -157,7 +157,5 @@ $ docker-compose up
|
|||||||
|
|
||||||
## How to make a release
|
## How to make a release
|
||||||
|
|
||||||
Just run:
|
Just push a git tag. CI will do the rest.
|
||||||
```
|
|
||||||
$ make release V=2.0.7
|
|
||||||
```
|
|
||||||
|
Reference in New Issue
Block a user