Skip to content

Commit

Permalink
Merge pull request #5 from clj-codes/feat/adds-release-ci
Browse files Browse the repository at this point in the history
feat: adds release CI
  • Loading branch information
rafaeldelboni authored May 1, 2023
2 parents 6d56738 + f9cb8d6 commit efb165f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

# Controls when the action will run.
on:
push:
tags:
- 'v*.*.*'

jobs:

build-release:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Write release version
run: |
TAG=${{github.ref_name}}
echo "VERSION=${TAG:1}" >> $GITHUB_ENV
- name: Prepare java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'

- name: Install clojure cli
uses: DeLaGuardo/setup-clojure@master
with:
cli: 1.11.1.1273

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/deps.edn') }}
restore-keys: ${{ runner.os }}-m2

- name: Build Datalevin DB File
run: clojure -X:extract

- name: Zips artifacts
run: zip -r "docs-db.zip" "target/docs-db/*"

- name: Release to GiHub
uses: softprops/action-gh-release@v1
with:
files: "*.zip"
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit efb165f

Please sign in to comment.