Skip to content

Create Release

Create Release #10

Workflow file for this run

name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Replace version and service in release_const.py
run: |
echo 'COMPONENT_VERSION = "${{ github.event.inputs.version }}"' > release_const.py
echo 'SERVICE_NAME = "oig_cloud"' >> release_const.py
- name: Update version property in manifest.json
run: |
jq --arg version ${{ github.event.inputs.version }} '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json
- name: Commit changes
run: |
git config --global user.name "Pavel Simsa"
git config --global user.email "pavel@simsa.cz"
git add release_const.py manifest.json
git commit -m "Creating release"
git tag -a v${{ github.event.inputs.version }} -m "Version ${{ github.event.inputs.version }}"
git push --tags
- name: Create draft release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
draft: true