mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
ci: split draft release logic into separate workflow (#2351)
This commit is contained in:
36
.github/workflows/draft_release.yml
vendored
Normal file
36
.github/workflows/draft_release.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
- v[0-9]+.[0-9]+.[0-9]+-*
|
||||
|
||||
name: draft release
|
||||
jobs:
|
||||
draft_release:
|
||||
name: draft release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ^1.15
|
||||
|
||||
- name: Install goreleaser
|
||||
run: go install github.com/goreleaser/goreleaser@latest
|
||||
|
||||
- name: Goreleaser release
|
||||
run: goreleaser release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
@ -1,8 +1,6 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
- v[0-9]+.[0-9]+.[0-9]+-*
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
name: release
|
||||
jobs:
|
||||
@ -11,35 +9,27 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Get release
|
||||
id: get_release
|
||||
uses: bruceadams/get-release@v1.3.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ^1.15
|
||||
|
||||
- name: Install goreleaser
|
||||
run: go install github.com/goreleaser/goreleaser@latest
|
||||
|
||||
- name: Build binaries
|
||||
run: go run build/build.go
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
|
||||
- name: Goreleaser release
|
||||
run: goreleaser release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get release from tag
|
||||
run: echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:11})
|
||||
id: versioner
|
||||
@ -50,12 +40,6 @@ jobs:
|
||||
- name: Copy Linux version to dnscontrol
|
||||
run: cp dnscontrol-Linux usr/bin/dnscontrol
|
||||
|
||||
# - name: Get release
|
||||
# id: get_release
|
||||
# uses: bruceadams/get-release@v1.3.2
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Bundle RPM
|
||||
uses: bpicode/github-action-fpm@master
|
||||
with:
|
||||
|
Reference in New Issue
Block a user