feat(init): create initial release #3
This file contains 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: "Test & Release" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: write | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ["v0.44.1", "latest"] | |
fail-fast: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Lint Success | |
uses: "./" | |
with: | |
version: ${{ matrix.version }} | |
directory: "./test/success" | |
- name: Lint Failure | |
id: fail | |
uses: "./" | |
with: | |
version: ${{ matrix.version }} | |
directory: "./test/fail" | |
continue-on-error: true | |
- name: Check Failure | |
if: ${{ steps.fail.outcome != 'failure' }} | |
run: exit 1 | |
release: | |
name: Release | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Semantic Release Plugins | |
run: | | |
npm install semantic-release-replace-plugin -D | |
npm install --save-dev semantic-release-major-tag | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
dry_run: ${{ github.event_name == 'pull_request' }} | |
ci: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |