Release #3
This file contains hidden or 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
| name: Release Plasmoid | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version_part: | |
| description: "Version part to bump" | |
| required: true | |
| default: patch | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Install bump2version | |
| run: pip install bump2version | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "[email protected]" | |
| - name: Bump version | |
| id: bump | |
| run: | | |
| bump2version ${{ github.event.inputs.version_part }} | |
| - name: Push commit and tag | |
| run: | | |
| git push | |
| git push --tags | |
| - name: Get new tag | |
| id: tag | |
| run: | | |
| TAG=$(git describe --tags --abbrev=0) | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| - name: Create plasmoid zip | |
| run: | | |
| zip -r applet-wunderground-${{ steps.tag.outputs.tag }}.plasmoid plasmoid | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.tag.outputs.tag }} | |
| name: Release ${{ steps.tag.outputs.tag }} | |
| files: applet-wunderground-${{ steps.tag.outputs.tag }}.plasmoid | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |