Skip to content

Commit

Permalink
Fix deployment condition (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
totakke committed Mar 21, 2023
1 parent 268e82b commit 33040fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ jobs:
run: echo "version=$(clojure -T:build get-version)" >> "$GITHUB_OUTPUT"

deploy-clojars-snapshot:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: ${{ github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
endsWith(needs.get-version.outputs.version, '-SNAPSHOT') }}
needs: [test, validate, lint, get-version]
runs-on: ubuntu-latest
container:
image: clojure:openjdk-11-tools-deps
steps:
- uses: actions/checkout@v2
- name: Build
if: endsWith(needs.get-version.outputs.version, '-SNAPSHOT')
run: clojure -T:build jar :jar-file cruler.jar
- name: Copy pom.xml
run: cp target/classes/META-INF/maven/xcoo/cruler/pom.xml pom.xml
- name: Deploy
if: endsWith(needs.get-version.outputs.version, '-SNAPSHOT')
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
Expand Down

0 comments on commit 33040fe

Please sign in to comment.