generated from hasundue/template-deno
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
80 lines (66 loc) · 2.11 KB
/
action.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Denomantic Release
description: Semantic release for Deno project
inputs:
script:
description: path to cli.ts
required: true
default: https://deno.land/x/denomantic_release@0.10.3/cli.ts
repository:
description: target repository
required: true
default: ${{ github.repository }}
token:
description: GitHub access token authorized to run workflows
required: true
default: ${{ github.token }}
draft:
description: if drafting a release
required: false
type: boolean
default: false
dry-run:
description: do not actually create a release
required: false
type: boolean
default: false
assets:
description: paths for assets to be uploaded
required: false
type: string
denopendabot:
description: running mode of denopendabot ('action', 'app', or 'disabled')
required: true
default: action
runs:
using: composite
steps:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.36.4 # @denopendabot denoland/deno
- id: run
run: >
deno run -q --allow-env --allow-net --allow-write
${{ inputs.assets && '--allow-read' }}
${{ inputs.script }}
${{ inputs.repository }}
${{ inputs.token && format('--token {0}', inputs.token) }}
${{ inputs.draft == 'true' && '--draft' || '' }}
${{ inputs.dry-run == 'true' && '--dry-run' || '' }}
${{ inputs.assets && format('--assets {0}', inputs.assets) }}
shell: bash
- uses: hasundue/denopendabot@0.17.2 # @denopendabot hasundue/denopendabot
if: ${{ steps.run.outputs.needs_update && inputs.denopendabot != 'disabled' }}
with:
mode: ${{ inputs.denopendabot }}
release: ${{ steps.run.outputs.version }}
auto-merge: any
outputs:
version:
description: version of the release to be created
value: ${{ steps.run.outputs.version }}
needs_update:
description: true if version numbers should be updated before release
value: ${{ steps.run.outputs.needs_update }}
released:
description: release_id if created
value: ${{ steps.run.outputs.released }}