Skip to content

Tag and Release

Tag and Release #12

Workflow file for this run

name: Tag and Release
on: workflow_dispatch
jobs:
tag-and-release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-package: jdk
architecture: x64
- uses: DeLaGuardo/setup-clojure@master
with:
cli: latest
- name: Show versions
run: |
java -version
clojure --version
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.m2
key: clj-cache-${{ hashFiles('**/deps.edn') }}
restore-keys: |
clj-cache-
- name: Deploy to clojars
id: deploy
run: clojure -T:build deploy
env:
CLOJARS_PASSWORD: ${{secrets.CLOJARS_PASSWORD}}
CLOJARS_USERNAME: ${{secrets.CLOJARS_USERNAME}}
- name: Create tag and release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.deploy.outputs.version }}
release_name: ${{ steps.deploy.outputs.version }}
body: released
draft: false
prerelease: false
- name: Update documents
run: |
clojure -T:build update-documents
git diff
git config --global user.email "github-actions@example.com"
git config --global user.name "github-actions"
git add -A
git commit -m "Update for release" || exit 0
git push