Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add actions for manual version updates #68

Merged
merged 2 commits into from Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/update-versions.yml
@@ -0,0 +1,31 @@
name: Update Versions

on:
workflow_dispatch:
inputs:
branchVersion:
description: 'Branch version number'
required: true
packageVersion:
description: 'Package version number'
required: true
manifestVersion:
description: 'Manifest version number'
required: true

jobs:
create-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Replace Package Version
run: |
find . -name "package.json" -type f -exec sed -i "s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.packageVersion }}\"/g" {} \;
- name: Replace Manifest Version
run: |
find . -type f \( -name "*.manifest.*.json" -o -name "manifest.*.json" \) -exec sed -i "s/\"runtime\":\s*{\s*\"version\":\s*\".*\"\s*}/\"runtime\":{\"version\":\"${{ github.event.inputs.manifestVersion }}\"}/g" {} \;
- name: Create Branch
run: |
git checkout -b ${{ github.event.inputs.branchVersion }}
git push origin ${{ github.event.inputs.branchVersion }}