Liking cljdoc? Tell your friends :D

GitHub Actions

When you set true to :github-actions? in build.edn file, build.edn will set following outputs.

FunctionOutputDescription

pom

${{ steps.ID.outputs.pom }}

Path for the pom.xml file

jar

${{ steps.ID.outputs.jar }}

Path for the generated JAR file

uberjar

${{ steps.ID.outputs.uberjar }}

Path for the generated standalone JAR file

install

${{ steps.ID.outputs.version }}

Installed version string

deploy

${{ steps.ID.outputs.version }}

Deployed version string

update-documents

${{ steps.ID.outputs.version }}

Tagged version string

bump-major-version

${{ steps.ID.outputs.version }}

Bumped new version string

bump-minor-version

${{ steps.ID.outputs.version }}

Bumped new version string

bump-patch-version

${{ steps.ID.outputs.version }}

Bumped new version string

add-snapshot

${{ steps.ID.outputs.version }}

Updated new version string

remove-snapshot

${{ steps.ID.outputs.version }}

Updated new version string

Automate your release process

If you’d like to automate your release process with GitHub Actions, it is good to refer following examples:

merr’s Example

name: Tag and Release
on: workflow_dispatch

jobs:
  tag-and-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          # NOTE: Fetch all for counting commits
          fetch-depth: 0

      # ... abbreviation ...

      - name: deploy to clojars
        # NOTE: Specify ID to refer outputs from other steps
        id: deploy
        run: clojure -T:build deploy
        env:
          CLOJARS_PASSWORD: ${{secrets.CLOJARS_PASSWORD}}
          CLOJARS_USERNAME: ${{secrets.CLOJARS_USERNAME}}

      - uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          # NOTE: Refer outputs
          tag_name: ${{ steps.deploy.outputs.version }}
          release_name: ${{ steps.deploy.outputs.version }}
          body: released
          draft: false
          prerelease: false

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close