mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
62 lines
No EOL
1.8 KiB
YAML
62 lines
No EOL
1.8 KiB
YAML
name: Create Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
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)
|
|
{
|
|
echo "changelog<<EOF"
|
|
python3 test/get_changes.py "$(python3 test/get_latest.py)"
|
|
echo EOF
|
|
} >> "$GITHUB_OUTPUT"
|
|
output3=$(python3 test/version_is_lower.py ${{ steps.previoustag.outputs.tag }})
|
|
echo "latestVersion=$output1" >> $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 }}
|
|
|