Package and Release #15
Workflow file for this run
This file contains 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: Package and Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
package-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get the version | |
id: get_version | |
run: | | |
# Remove 'v' prefix from tag | |
VERSION=${GITHUB_REF#refs/tags/v} | |
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
echo "VERSION_WITH_V=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Build plugin | |
run: | | |
chmod +x build.sh | |
./build.sh ${{ steps.determine_version.outputs.NEW_VERSION }} | |
- name: Create release artifact | |
run: | | |
chmod +x release.sh | |
./release.sh ${{ steps.determine_version.outputs.NEW_VERSION }} | |
- name: Upload release artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-artifact | |
path: dist/*.zip | |
- name: Create Release | |
if: success() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create ${{ steps.get_version.outputs.VERSION_WITH_V }} \ | |
--title "Release ${{ steps.get_version.outputs.VERSION_WITH_V }}" \ | |
--notes "Release ${{ steps.get_version.outputs.VERSION_WITH_V }}" \ | |
dist/betterportal-theme-embedded-${{ steps.get_version.outputs.VERSION_WITH_V }}.zip | |
- name: Update SVN with latest code | |
run: | | |
chmod +x update-svn.sh | |
./update-svn.sh | |
- name: Cleanup | |
if: always() | |
run: | | |
chmod +x cleanup.sh | |
./cleanup.sh |