LetsTryGPT/agent4-implementation
0
1name: Release2 3on:4 push:5 tags:6 - 'v*' # Push events matching v1.0, v20.15.10, etc.7 8jobs:9 build:10 runs-on: ubuntu-latest11 steps:12 - uses: actions/checkout@v413 14 - name: Setup Node.js15 uses: actions/setup-node@v416 with:17 node-version: '18'18 registry-url: 'https://registry.npmjs.org'19 20 - name: Install dependencies21 run: npm ci22 23 - name: Build24 run: npm run build25 26 - name: Run tests27 run: npm test28 29 - name: Create Release30 id: create_release31 uses: softprops/action-gh-release@v132 env:33 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}34 with:35 tag_name: ${{ github.ref_name }}36 name: Release ${{ github.ref_name }}37 draft: false38 prerelease: false39 generate_release_notes: true40 41 - name: Publish to npm42 if: startsWith(github.ref, 'refs/tags/v')43 run: |44 npm config set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}45 npm publish --access public46 env:47 NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}48 49 - name: Update CHANGELOG.md50 uses: stefanzweifel/git-auto-commit-action@v451 with:52 commit_message: "chore: update CHANGELOG.md for ${{ github.ref_name }}"53 file_pattern: CHANGELOG.md54 commit_user_name: GitHub Actions55 commit_user_email: actions@github.com56 commit_author: GitHub Actions <actions@github.com>57 