Integrate Aliyun event resources into stack lifecycle commands with a… #189
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: release | |
| on: | |
| push: | |
| branches: [master] | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write | |
| jobs: | |
| release: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| node-version: [24.x] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Github checkout | |
| uses: actions/checkout@v4 | |
| if: matrix.os == 'ubuntu-latest' | |
| with: | |
| fetch-depth: 0 # Fetch all history including tags for version checking | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| - run: npm run lint:check | |
| - run: npm audit --audit-level=critical | |
| - run: npm run build | |
| - run: npm run test:ci | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| fail_ci_if_error: true | |
| - name: build 🔧 | |
| run: npm run build | |
| - name: Generate changelog | |
| uses: jaywcjlove/changelog-generator@main | |
| id: changelog | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check for version change | |
| id: version_check | |
| run: ./scripts/check-version.sh . v | |
| - name: Publish package on NPM 📦 | |
| if: steps.version_check.outputs.should_release == 'true' | |
| run: npm publish | |
| - name: Create GitHub Release | |
| if: steps.version_check.outputs.should_release == 'true' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.version_check.outputs.tag_name }} | |
| name: ServerlessInsight ${{ steps.version_check.outputs.version }} | |
| body: | | |
| ${{ steps.changelog.outputs.compareurl }} | |
| ${{ steps.changelog.outputs.changelog }} |