Merge pull request #130 from sensslen/copilot/fix-message-item-xml-re… #5
Workflow file for this run
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' # Trigger on semantic version tags like v1.0.0, v2.1.3, etc. | |
| - 'v[0-9]+.[0-9]+.[0-9]+-*' # Also support pre-release tags like v1.0.0-beta.1 | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required for creating releases and uploading assets | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Check version format | |
| uses: nowsprinting/check-version-format-action@v3 | |
| id: version | |
| with: | |
| prefix: 'v' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Update package.json version | |
| run: | | |
| npm version ${{ steps.version.outputs.full_without_prefix }} --no-git-tag-version | |
| echo "Updated package.json to version ${{ steps.version.outputs.full_without_prefix }}" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Verify build output | |
| run: | | |
| if [ ! -d "dist" ]; then | |
| echo "Error: dist directory not found after build" | |
| exit 1 | |
| fi | |
| echo "Build output verified successfully" | |
| - name: Create release archive | |
| run: | | |
| cd dist | |
| zip -r ../cgf-propresenter-nurserymessages-${{ steps.version.outputs.full_without_prefix }}.zip . | |
| cd .. | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Release ${{ steps.version.outputs.full_without_prefix }} | |
| body: | | |
| ## Release ${{ steps.version.outputs.full_without_prefix }} | |
| ### Download | |
| Download the attached `cgf-propresenter-nurserymessages-${{ steps.version.outputs.full_without_prefix }}.zip` file and extract it to your web server. | |
| ### Installation | |
| 1. Download the zip file below | |
| 2. Extract the contents to your web server directory | |
| 3. Configure your web server to serve the files | |
| 4. Access the application in your browser | |
| See the [README](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/README.md) for more details. | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: ${{ steps.version.outputs.is_stable != 'true' }} | |
| files: | | |
| cgf-propresenter-nurserymessages-${{ steps.version.outputs.full_without_prefix }}.zip |