Skip to content

Commit

Permalink
use env for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Dec 20, 2023
1 parent ee32853 commit 75da4a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/clojure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ jobs:
with:
distribution: 'adopt'
java-version: '11'
- name: Configure settings.xml
run: |
mkdir -p ~/.m2
echo "<settings><servers><server></id><username>${{ secrets.CLOJARS_USER }}</username><password>${{ secrets.CLOJARS_TOKEN }}</password></server></servers></settings>" > ~/.m2/settings.xml
- name: deploy
env:
CLOJARS_USER: ${{ secrets.CLOJARS_USER }}
CLOJARS_TOKEN: ${{ secrets.CLOJARS_TOKEN }}
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
if [[ "$COMMIT_MSG" == "Release :major" ]]; then
Expand All @@ -85,5 +83,3 @@ jobs:
else
lein deploy snapshot
fi
- run: rm -f ~/.m2/settings.xml
if: ${{ always() }}
8 changes: 6 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@
:src-uri "http://github.com/metosin/ring-swagger/blob/master/"
:src-uri-prefix "#L"}
:deploy-repositories [["snapshot" {:url "https://clojars.org/repo"
:username [:gpg :env/clojars_user]
:password [:gpg :env/clojars_token]
:sign-releases false}]
["release" {:url "https://clojars.org/repo"
:sign-releases false}]]
["releases" {:url "https://clojars.org/repo"
:username [:gpg :env/clojars_user]
:password [:gpg :env/clojars_token]
:sign-releases false}]]
:release-tasks [["clean"]
["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
Expand Down

0 comments on commit 75da4a7

Please sign in to comment.