name: Create Release on: push: paths: - index.json jobs: build: name: Create Release runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - 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) output2=$(python3 test/get_changes.py "$output1") output3=$(python3 test/version_is_lower.py ${{ steps.previoustag.outputs.tag }}) echo "latestVersion=$output1" >> $GITHUB_OUTPUT echo "changelog=$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: Release ${{ steps.tag_version.outputs.new_tag }} artifacts: "plugin_manager.py" body: | ## Changelog ${{ steps.set_variables.outputs.changelog }}