-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.34 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: release
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
default: 'latest'
required: false
schedule:
- cron: "0 4 * * *"
jobs:
release:
runs-on: ubuntu-latest
steps:
- id: runner
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: actions
repo: runner
excludes: prerelease, draft
- name: Tag name
id: tag
run: |
echo "Upstream release = actions/runner: ${{ steps.runner.outputs.release }}"
if [ "${{ github.event.inputs.version || 'latest' }}" = "latest" ]; then
export TAG="${{ steps.runner.outputs.release }}"
else
export TAG="${{ github.event.inputs.version }}"
fi
echo "Generating tag: $TAG"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- uses: mukunku/[email protected]
id: checkTag
with:
tag: ${{ steps.tag.outputs.tag }}
- name: Create Release
if: ${{ steps.checkTag.outputs.exists == 'false' }}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
automatic_release_tag: "${{ steps.tag.outputs.tag }}"
prerelease: false
title: "${{ steps.tag.outputs.tag }}"