Update app version #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update 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: false | |
permissions: | |
contents: write | |
jobs: | |
update-version: | |
name: Update app version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update app version | |
uses: athombv/github-action-homey-app-version@master | |
id: update_app_version | |
with: | |
version: ${{ inputs.version }} | |
changelog: ${{ inputs.changelog }} | |
- name: Commit & push changes | |
run: | | |
VERSION=${{ steps.update_app_version.outputs.version }} | |
npm version $VERSION --no-git-tag-version --allow-same-version | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit -m "Update app version to v$VERSION" | |
git tag "v$VERSION" | |
git push origin HEAD --tags | |
gh release create "v$VERSION" -t "v$VERSION" --notes "" --generate-notes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_TOKEN: ${{ github.token }} |