mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-24 23:53:01 +08:00
feature: adding RPM/DEB package creation and upload as asset (#1030)
* feature: adding RPM/DEB package creation and upload as asset Using the fpm github action, this creates and uploads a RPM and DEB for each release * bugfix: fixing pathing bug Forgot that in not using path assignment I needed to build the directory structure. Fixed.
This commit is contained in:
parent
d7f40ed680
commit
4a337ec8d8
1 changed files with 43 additions and 0 deletions
43
.github/workflows/release.yml
vendored
43
.github/workflows/release.yml
vendored
|
@ -28,6 +28,28 @@ jobs:
|
|||
- name: Build binaries
|
||||
run: go run build/build.go
|
||||
|
||||
- name: Get release from tag
|
||||
run: echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:11})
|
||||
id: versioner
|
||||
|
||||
- name: Create target directory
|
||||
run: mkdir -p usr/bin
|
||||
|
||||
- name: Copy Linux version to dnscontrol
|
||||
run: cp dnscontrol-Linux usr/bin/dnscontrol
|
||||
|
||||
- name: Bundle RPM
|
||||
uses: bpicode/github-action-fpm@master
|
||||
with:
|
||||
fpm_args: 'usr/'
|
||||
fpm_opts: '-n dnscontrol -t rpm -s dir -v ${{ steps.versioner.outputs.RELEASE_VERSION }}'
|
||||
|
||||
- name: Bundle DEB
|
||||
uses: bpicode/github-action-fpm@master
|
||||
with:
|
||||
fpm_args: 'usr/'
|
||||
fpm_opts: '-n dnscontrol -t deb -s dir -v ${{ steps.versioner.outputs.RELEASE_VERSION }}'
|
||||
|
||||
- name: Upload dnscontrol-Darwin
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
|
@ -57,3 +79,24 @@ jobs:
|
|||
asset_path: ./dnscontrol.exe
|
||||
asset_name: dnscontrol.exe
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload RPM
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: dnscontrol-${{ steps.versioner.outputs.RELEASE_VERSION }}-1.x86_64.rpm
|
||||
asset_name: dnscontrol-${{ steps.versioner.outputs.RELEASE_VERSION }}-1.x86_64.rpm
|
||||
asset_content_type: application/x-rpm
|
||||
|
||||
- name: Upload DEB
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
asset_path: dnscontrol_${{ steps.versioner.outputs.RELEASE_VERSION }}_amd64.deb
|
||||
asset_name: dnscontrol_${{ steps.versioner.outputs.RELEASE_VERSION }}_amd64.deb
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
|
|
Loading…
Reference in a new issue