create workflow to auto create draft release for master
This commit is contained in:
parent
5bac68b21c
commit
d5e1ae5454
42
.github/workflows/master-release.yml
vendored
Normal file
42
.github/workflows/master-release.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: master-release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-build-release:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- uses: actions/setup-node@master
|
||||||
|
with:
|
||||||
|
node-version: "14.12.0"
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run validate
|
||||||
|
- run: npm run check-formatting
|
||||||
|
- name: "Find and save major_version from manifest"
|
||||||
|
run: awk 'BEGIN { FS="=" } /^major_version/ { print "MAJOR="$2; }' manifest >> $GITHUB_ENV
|
||||||
|
- name: "Find and save minor_version from manifest"
|
||||||
|
run: awk 'BEGIN { FS="=" } /^minor_version/ { print "MINOR="$2; }' manifest >> $GITHUB_ENV
|
||||||
|
- name: "Find and save build_version from manifest"
|
||||||
|
run: awk 'BEGIN { FS="=" } /^build_version/ { print "BUILD="$2; }' manifest >> $GITHUB_ENV
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: vimtor/action-zip@v1
|
||||||
|
with:
|
||||||
|
recursive: false
|
||||||
|
files: components/ images/ locale/ settings/ source/ manifest
|
||||||
|
dest: jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
|
||||||
|
- uses: marvinpinto/action-automatic-releases@latest
|
||||||
|
with:
|
||||||
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
automatic_release_tag: v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}
|
||||||
|
draft: true
|
||||||
|
prerelease: false
|
||||||
|
title: v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}
|
||||||
|
files: ${{ github.workspace }}/jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
|
||||||
|
path: ${{ github.workspace }}/jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
|
||||||
|
if-no-files-found: error
|
Loading…
Reference in New Issue
Block a user