Skip to content

Commit

Permalink
add release drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbr committed Mar 24, 2022
1 parent 50d1429 commit 9f68a4f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 26 deletions.
15 changes: 15 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
change-template: "* $TITLE (#$NUMBER) @$AUTHOR"
categories:
- title: '🚀 Features'
labels:
- enhancement
- title: "🛠️ Bugfixes"
labels:
- bug
- title: "📖 Documentation"
labels:
- documentation
template: |
## Changelog
$CHANGES
32 changes: 6 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Build NixOS WSL tarball'

on: [push, pull_request]
on: [push, pull_request, release]

jobs:
build:
Expand Down Expand Up @@ -60,31 +60,11 @@ jobs:
with:
name: installer

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
tag_name: ${{ github.ref }}

- name: Upload tarball as release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach to release
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: nixos-wsl-x86_64-linux.tar.gz
asset_path: result/tarball/nixos-wsl-x86_64-linux.tar.gz
asset_content_type: application/gzip

- name: Upload installer as release asset
uses: actions/upload-release-asset@v1
files: |
nixos-wsl-x86_64-linux.tar.gz
nixos-wsl-installer.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: nixos-wsl-installer.tar.gz
asset_path: result/tarball/nixos-wsl-installer.tar.gz
asset_content_type: application/gzip
19 changes: 19 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
-
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9f68a4f

Please sign in to comment.