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

Release Official version action #133

Merged
3 commits merged into from
Apr 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Relase new official MSFS IO
on:
workflow_dispatch:
inputs:
version:
description: 'Version number'
required: true
default: '0,0,0'

jobs:
increase_and_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Define Tag
run: |
v=${{github.event.inputs.version}}
version=${v//[,]/.}
echo "OFFICIAL_VERSION=$version" >> $GITHUB_ENV

- name: Print Tag
run: echo version is ${{env.OFFICIAL_VERSION}}

- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '"version": \((.*)\)'
replace: '"version": (${{github.event.inputs.version}})'
include: "addons/io_scene_gltf2_msfs/__init__.py"
- name: Log File Content
run: cat addons/io_scene_gltf2_msfs/__init__.py
- name: Setup git config
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Commit and push
run: |
# Stage the file, commit and push
git add addons/io_scene_gltf2_msfs/__init__.py
git commit -m "updated version"
git push origin main
- name: Update Release branch
run: |
# Stage the file, commit and push
git checkout release
git merge --squash main
git push origin release
git tag "v${{env.OFFICIAL_VERSION}}"
git push origin release --tags
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions
with:
tag_name: ${{env.OFFICIAL_VERSION}}
release_name: Release ${{env.OFFICIAL_VERSION}}
body: |
Official MSFS Blender IO v${{env.OFFICIAL_VERSION}}
draft: true
prerelease: false