name: Create Release on: push: branches: - main paths: - index.json jobs: build: name: Create Release runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.12' - name: 'Get Previous tag' uses: oprypin/find-latest-tag@v1.1.2 with: repository: ${{ github.repository }} releases-only: true # We know that all relevant tags have a GitHub release for them. id: previoustag - name: set_variables run: | output1=$(python3 test/get_latest.py get_latest_plugman_version) { echo "changelog<> "$GITHUB_OUTPUT" output2=$(python3 test/get_latest.py get_latest_api) output3=$(python3 test/versioning_tools.py ${{ steps.previoustag.outputs.tag }}) echo "latestVersion=$output1" >> $GITHUB_OUTPUT echo "latestAPI=$output2" >> $GITHUB_OUTPUT echo "shouldRun=$output3" >> $GITHUB_OUTPUT id: set_variables - name: Bump version and push tag if: ${{ steps.set_variables.outputs.shouldRun == '1' }} id: tag_version uses: mathieudutour/github-tag-action@v6.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} custom_tag: | ${{ steps.set_variables.outputs.latestVersion }} - name: Create release if: ${{ steps.tag_version.outputs.new_tag }} uses: ncipollo/release-action@v1 with: tag: ${{ steps.tag_version.outputs.new_tag }} name: ${{ steps.tag_version.outputs.new_tag }} (api ${{ steps.set_variables.outputs.latestAPI }}) artifacts: 'plugin_manager.py' body: | ## Changelog ${{ steps.set_variables.outputs.changelog }}