|
1 | 1 | name: Installer Release V11 |
2 | 2 |
|
3 | 3 | on: |
4 | | - workflow_dispatch: |
5 | | - inputs: |
6 | | - version_tag: |
7 | | - description: "Version to deploy. (e.g., v11.0.0-alpha.1)" |
8 | | - required: true |
| 4 | + release: |
| 5 | + types: ['released', 'prereleased'] |
9 | 6 |
|
10 | 7 | jobs: |
11 | 8 | setup_deployment: |
|
18 | 15 | - name: Validate and Determine Build Environment |
19 | 16 | id: set-env |
20 | 17 | run: | |
21 | | - VERSION="${{ github.event.inputs.version_tag }}" |
| 18 | + VERSION="${{ github.event.release.tag_name }}" |
| 19 | + |
| 20 | + # Verify tag starts with v11. |
| 21 | + if [[ ! "$VERSION" =~ ^v11\. ]]; then |
| 22 | + echo "Skipping: This workflow only processes v11.* releases" |
| 23 | + echo "Received tag: $VERSION" |
| 24 | + exit 0 |
| 25 | + fi |
22 | 26 | |
23 | 27 | # Validate version format and determine environment |
24 | 28 | if [[ "$VERSION" =~ ^v11\.[0-9]+\.[0-9]+$ ]]; then |
|
48 | 52 | name: Build |
49 | 53 | runs-on: ubuntu-24.04 |
50 | 54 | needs: setup_deployment |
51 | | - if: ${{ needs.setup_deployment.outputs.environment != '' }} |
| 55 | + if: needs.setup_deployment.outputs.environment != '' |
52 | 56 | steps: |
53 | 57 | - name: Check out code into the right branch |
54 | 58 | uses: actions/checkout@v4 |
@@ -82,16 +86,12 @@ jobs: |
82 | 86 | -X 'github.com/utmstack/UTMStack/installer/config.REPLACE=${{ secrets.CM_ENCRYPT_SALT }}' \ |
83 | 87 | -X 'github.com/utmstack/UTMStack/installer/config.PUBLIC_KEY=${{ secrets.CM_SIGN_PUBLIC_KEY }}'" . |
84 | 88 |
|
85 | | - - name: Create Release |
86 | | - id: create_release |
| 89 | + - name: Upload Release Assets |
87 | 90 | uses: softprops/action-gh-release@v2 |
88 | 91 | env: |
89 | 92 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
90 | 93 | with: |
91 | | - tag_name: ${{ needs.setup_deployment.outputs.version }} |
92 | | - name: ${{ needs.setup_deployment.outputs.version }} |
93 | 94 | body_path: ./CHANGELOG.md |
94 | 95 | draft: false |
95 | | - prerelease: ${{ needs.setup_deployment.outputs.environment != 'prod' }} |
96 | 96 | files: | |
97 | 97 | ./installer/installer |
0 commit comments