fix: load caddy rules on ip-based installation (#670) #215
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
| # Workflow: Release | |
| # Description: Generates a prerelease tag and GitHub pre-release | |
| # Why: Provides prerelease builds for early testing | |
| name: Create Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| ssh-key: ${{ secrets.DEPLOY_KEY }} | |
| - name: Conventional Changelog Action | |
| id: changelog | |
| uses: TriPSs/conventional-changelog-action@v5 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| git-user-name: 'github-actions[bot]' | |
| git-user-email: 'github-actions[bot]@users.noreply.github.com' | |
| git-message: 'chore(release): {version}' | |
| preset: 'angular' | |
| tag-prefix: 'v' | |
| version-file: 'package.json' | |
| skip-on-empty: 'true' | |
| skip-ci: 'true' | |
| create-summary: 'true' | |
| pre-release: 'true' | |
| pre-release-identifier: 'alpha' | |
| git-push: 'true' | |
| release-count: 0 | |
| - name: Update version.txt | |
| if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
| run: echo "${{ steps.changelog.outputs.tag }}" > version.txt | |
| - name: Commit version.txt update | |
| if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
| run: | | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add version.txt | |
| git commit -m "chore(release): update version.txt to ${{ steps.changelog.outputs.tag }}" || echo "No changes to commit" | |
| git push origin HEAD:master | |
| - name: Create GitHub Pre-Release | |
| if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.changelog.outputs.tag }} | |
| name: ${{ steps.changelog.outputs.tag }} | |
| body: ${{ steps.changelog.outputs.clean_changelog }} | |
| prerelease: true | |
| - name: Notify Discord about Pre-Release | |
| if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
| uses: appleboy/[email protected] | |
| with: | |
| webhook_id: ${{ secrets.WEBHOOK_ID }} | |
| webhook_token: ${{ secrets.WEBHOOK_TOKEN }} | |
| username: "Release Bot" | |
| message: | | |
| - New pre-release published: **${{ steps.changelog.outputs.tag }}** | |
| - https://github.com/${{ github.repository }}/releases/tag/${{ steps.changelog.outputs.tag }} |