fix(add-action): return the created item #109
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: | |
| - main | |
| - next | |
| pull_request: | |
| branches: | |
| - main | |
| - next | |
| permissions: | |
| contents: write # to be able to publish a GitHub release | |
| issues: write # to be able to comment on released issues | |
| pull-requests: write # to be able to comment on released pull requests | |
| id-token: write # to enable use of OIDC for npm provenance | |
| jobs: | |
| release: | |
| name: 🚀 Release | |
| if: ${{!contains(github.event.head_commit.message, '[skip ci]') && !startsWith(github.event.head_commit.message, 'chore:') && !startsWith(github.event.head_commit.message, 'style:') && !startsWith(github.event.head_commit.message, 'docs:') && !contains(github.event.pull_request.title, '[skip ci]') && !startsWith(github.event.pull_request.title, 'chore:') && !startsWith(github.event.pull_request.title, 'style:') && !startsWith(github.event.pull_request.title, 'docs:') && !startsWith(github.event.head_commit.message, 'chore(') && !startsWith(github.event.head_commit.message, 'style(') && !startsWith(github.event.head_commit.message, 'docs(') && !startsWith(github.event.pull_request.title, 'chore(') && !startsWith(github.event.pull_request.title, 'style(') && !startsWith(github.event.pull_request.title, 'docs(') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - run: echo ${{ github.workspace }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Cache node_modules | |
| id: cache-node-modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| - name: 🏗️ Install | |
| uses: borales/actions-yarn@v5 | |
| with: | |
| cmd: install | |
| - name: 🧪 Test | |
| run: yarn test:cov | |
| - name: 📊 Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4.0.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: form-atoms/list-atom | |
| - name: 🔨 Build | |
| uses: borales/actions-yarn@v5 | |
| with: | |
| cmd: build | |
| - name: 🚢 Release | |
| uses: borales/actions-yarn@v5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| with: | |
| cmd: semantic-release |