lein #7
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: | |
| - '**' | |
| tags: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build: | |
| name: "Build & Test" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Leiningen | |
| uses: ./.github/actions/setup-leiningen | |
| - name: Run tests | |
| run: lein test | |
| test: | |
| name: "Test (develop branch)" | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/develop' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Leiningen | |
| uses: ./.github/actions/setup-leiningen | |
| with: | |
| install-deps: 'true' | |
| - name: Run tests | |
| run: lein test | |
| publish: | |
| name: "Publish to Clojars" | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Leiningen | |
| uses: ./.github/actions/setup-leiningen | |
| with: | |
| install-deps: 'true' | |
| - name: Run tests | |
| run: lein test | |
| - name: Deploy to Clojars | |
| env: | |
| CLOJARS_USERNAME: ${{ vars.CLOJARS_USERNAME }} | |
| CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD}} | |
| run: lein deploy |