Skip to content

ci: Update actions

ci: Update actions #21

Workflow file for this run

name: "Release"
on:
push:
branches:
- 'release/**'
jobs:
bump:
name: "Bump"
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_version: ${{ steps.tag_version.outputs.new_version }}
new_tag: ${{ steps.tag_version.outputs.new_tag }}
changelog: ${{ steps.tag_version.outputs.changelog }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: ./.github/actions/github-tag-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
release_branches: release/.*
tag_filter: ^v.0
release:
name: "Release"
needs: bump
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ needs.bump.outputs.new_tag != null }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Set env
run: |
echo "ASSET_DIR=package" >> $GITHUB_ENV
echo "ASSET_BASE_NAME=${{ github.event.repository.name }}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${{ needs.bump.outputs.new_version }}" >> $GITHUB_ENV
echo "RELEASE_VERSION_TAG=${{ needs.bump.outputs.new_tag }}" >> $GITHUB_ENV
# Sets new X-KDE-PluginInfo-Version in metadata.json
- name: Update plasmoid version
run: echo "`jq '.KPlugin.Version="'$RELEASE_VERSION'"' $ASSET_DIR/metadata.json`" > $ASSET_DIR/metadata.json
# Creates plasmoid package
- name: Package
run: |
cd $ASSET_DIR
zip -r ../$ASSET_BASE_NAME-$RELEASE_VERSION.plasmoid *
cd ..
- uses: ncipollo/release-action@v1
with:
artifacts: "*.plasmoid"
tag: ${{ env.RELEASE_VERSION_TAG }}
body: ${{ needs.bump.outputs.changelog }}
token: ${{ secrets.GITHUB_TOKEN }}