-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (50 loc) · 1.66 KB
/
homey-app-version.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
name: Update Homey App Version
on:
workflow_dispatch:
inputs:
version:
type: choice
description: Version
required: true
default: patch
options:
- major
- minor
- patch
changelog:
type: string
description: Changelog
required: true
# Needed in order to push the commit and create a release
permissions:
contents: write
jobs:
main:
name: Update Homey App Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Update Homey App Version
uses: athombv/github-action-homey-app-version@master
id: update_app_version
with:
version: ${{ inputs.version }}
changelog: ${{ inputs.changelog }}
# Needed to undo the changes made to app.json by the version action
- run: npm ci
- run: npm run format
- name: Commit & Push
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Update Homey App Version to v${{ steps.update_app_version.outputs.version }}"
git tag "v${{ steps.update_app_version.outputs.version }}"
git push origin HEAD --tags
gh release create "v${{ steps.update_app_version.outputs.version }}" -t "v${{ steps.update_app_version.outputs.version }}" --notes "" --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}