-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
192 additions
and
160 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,62 +16,62 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Replace version and service in release_const.py | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
echo 'COMPONENT_VERSION = "${{ github.event.inputs.version }}"' > release_const.py | ||
if [ "${{ github.event.inputs.version }}" == "dev" ]; then | ||
echo 'SERVICE_NAME = "oig_cloud_dev"' >> release_const.py | ||
else | ||
echo 'SERVICE_NAME = "oig_cloud"' >> release_const.py | ||
fi | ||
- name: Replace version and service in release_const.py | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
echo 'COMPONENT_VERSION = "${{ github.event.inputs.version }}"' > release_const.py | ||
if [ "${{ github.event.inputs.version }}" == "dev" ]; then | ||
echo 'SERVICE_NAME = "oig_cloud_dev"' >> release_const.py | ||
else | ||
echo 'SERVICE_NAME = "oig_cloud"' >> release_const.py | ||
fi | ||
- name: Update version property in manifest.json | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
if [ "${{ github.event.inputs.version }}" == "dev" ]; then | ||
jq --arg version '0.0.0' '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json | ||
else | ||
jq --arg version ${{ github.event.inputs.version }} '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json | ||
fi | ||
- name: Update version property in manifest.json | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
if [ "${{ github.event.inputs.version }}" == "dev" ]; then | ||
jq --arg version '0.0.0' '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json | ||
else | ||
jq --arg version ${{ github.event.inputs.version }} '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json | ||
fi | ||
- name: Commit changes | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
git config --global user.name "Pavel Simsa" | ||
git config --global user.email "[email protected]" | ||
git add release_const.py manifest.json | ||
git commit -m "Setting release variables to ${{ github.event.inputs.version }}" | ||
- name: Commit changes | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
git config --global user.name "Pavel Simsa" | ||
git config --global user.email "[email protected]" | ||
git add release_const.py manifest.json | ||
git commit -m "Setting release variables to ${{ github.event.inputs.version }}" | ||
- name: Push changes | ||
working-directory: ./custom_components/oig_cloud | ||
if: ${{ github.event.inputs.create-tag != 'true' }} | ||
run: | | ||
git push | ||
- name: Create tag | ||
if: ${{ github.event.inputs.create-tag == 'true' }} | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
git tag -a v${{ github.event.inputs.version }} -m "Version ${{ github.event.inputs.version }}" | ||
git push --tags | ||
- name: Push changes | ||
working-directory: ./custom_components/oig_cloud | ||
if: ${{ github.event.inputs.create-tag != 'true' }} | ||
run: | | ||
git push | ||
- name: Create draft release | ||
uses: actions/create-release@v1 | ||
if: ${{ github.event.inputs.create-tag == 'true' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ github.event.inputs.version }} | ||
release_name: Release ${{ github.event.inputs.version }} | ||
draft: true | ||
- name: Create tag | ||
if: ${{ github.event.inputs.create-tag == 'true' }} | ||
working-directory: ./custom_components/oig_cloud | ||
run: | | ||
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 | ||
if: ${{ github.event.inputs.create-tag == 'true' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ github.event.inputs.version }} | ||
release_name: Release ${{ github.event.inputs.version }} | ||
draft: true | ||
|
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
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
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
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
Oops, something went wrong.