v0.8.0 add api log detail site notification overrides export template… #11
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 ZIP | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Manual version name, e.g. v0.2.0' | |
| required: false | |
| default: '' | |
| permissions: | |
| contents: write | |
| env: | |
| PACKAGE_NAME: inquiry-system | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set version | |
| id: vars | |
| shell: bash | |
| run: | | |
| if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then | |
| VERSION="${GITHUB_REF_NAME}" | |
| elif [[ -n "${{ github.event.inputs.version }}" ]]; then | |
| VERSION="${{ github.event.inputs.version }}" | |
| else | |
| VERSION="manual-${GITHUB_RUN_NUMBER}" | |
| fi | |
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
| echo "zip_name=${PACKAGE_NAME}-${VERSION}.zip" >> "$GITHUB_OUTPUT" | |
| echo "folder_name=${PACKAGE_NAME}" >> "$GITHUB_OUTPUT" | |
| - name: Prepare package folder | |
| shell: bash | |
| run: | | |
| mkdir -p "dist/${{ steps.vars.outputs.folder_name }}" | |
| rsync -av ./ "dist/${{ steps.vars.outputs.folder_name }}/" \ | |
| --exclude '.git' \ | |
| --exclude '.github' \ | |
| --exclude 'dist' \ | |
| --exclude '.DS_Store' \ | |
| --exclude 'Thumbs.db' \ | |
| --exclude '.idea' \ | |
| --exclude '.vscode' \ | |
| --exclude '*.log' | |
| - name: Create ZIP package | |
| shell: bash | |
| run: | | |
| cd dist | |
| zip -r "${{ steps.vars.outputs.zip_name }}" "${{ steps.vars.outputs.folder_name }}" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.vars.outputs.zip_name }} | |
| path: dist/${{ steps.vars.outputs.zip_name }} | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| shell: bash | |
| run: | | |
| gh release create "${{ steps.vars.outputs.version }}" \ | |
| "dist/${{ steps.vars.outputs.zip_name }}" \ | |
| --title "${{ steps.vars.outputs.version }}" \ | |
| --notes "Release ${{ steps.vars.outputs.version }}" |