Skip to content

Commit 6263de5

Browse files
authored
Merge pull request #567 from github/543-workflow-build-release
Build and Release Workflow
2 parents 1f07fd5 + dfe71d6 commit 6263de5

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version - patch version of the release (e.g. x.y.z)'
8+
required: true
9+
type: string
10+
release-notes:
11+
description: 'Release Notes - string of markdown'
12+
required: true
13+
type: string
14+
draft:
15+
description: 'Draft - true if the release should be a draft'
16+
required: true
17+
type: boolean
18+
default: true
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Install dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y moreutils debhelper help2man
28+
- name: Create tag
29+
run: |
30+
git tag -a v${{ github.event.inputs.version }} -m "v${{ github.event.inputs.version }}"
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
- name: Package deb
34+
run: |
35+
bash scripts/package-deb
36+
- name: Package tarball
37+
run: |
38+
bash scripts/package-tarball
39+
release:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Create Release
44+
uses: ncipollo/release-action@v1
45+
with:
46+
repo: github/backup-utils
47+
artifacts: |
48+
./dist/github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
49+
./dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb
50+
# token: ${{ secrets.GITHUB_TOKEN }} may need token, but try without first
51+
name: v${{ github.event.inputs.version }}
52+
draft: ${{ github.event.inputs.draft }}
53+
body: ${{ github.event.inputs.release-notes }}

0 commit comments

Comments
 (0)