refactor: migrate to esm #37
Workflow file for this run
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: ci | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - next | |
| pull_request: | |
| branches: | |
| - master | |
| - next | |
| jobs: | |
| get-next-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: volta-cli/action@v4 | |
| - run: npm ci | |
| - run: npx semantic-release --dry-run | |
| id: get-next-version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| outputs: | |
| new-release-published: ${{ steps.get-next-version.outputs.new-release-published }} | |
| new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} | |
| new-release-git-tag: ${{ steps.get-next-version.outputs.new-release-git-tag }} | |
| new-release-notes: ${{ steps.get-next-version.outputs.new-release-notes }} | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: get-next-version | |
| if: needs.get-next-version.outputs.new-release-published == 'true' | |
| steps: | |
| - run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }} with tag ${{ needs.get-next-version.outputs.new-release-git-tag }}" | |
| - run: | | |
| cat << 'EOF' | |
| The release notes are: | |
| ${{ needs.get-next-version.outputs.new-release-notes }} | |
| EOF | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: volta-cli/action@v4 | |
| - run: npm ci | |
| - run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |