Skip to content

Commit 36ec83d

Browse files
committed
[build] refactor release process, prepare for v0.1.0
1 parent 892e3b2 commit 36ec83d

File tree

6 files changed

+45
-29
lines changed

6 files changed

+45
-29
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
name: Release Version
2-
3-
on:
4-
push:
5-
tags:
6-
- "v*"
1+
name: Tag and Release
2+
on: workflow_dispatch
73

84
jobs:
9-
build-and-release:
5+
tag-and-release:
106
runs-on: ubuntu-latest
117
steps:
128
- uses: actions/checkout@v2
139
with:
1410
fetch-depth: 0
11+
1512
- uses: actions/setup-java@v2
1613
with:
1714
distribution: 'adopt'
1815
java-version: '11'
19-
- name: Setup Clojure
20-
uses: DeLaGuardo/setup-clojure@master
16+
17+
- uses: DeLaGuardo/setup-clojure@master
2118
with:
22-
cli: '1.10.3.1053'
19+
cli: latest
20+
2321
- name: Cache All The Things
2422
uses: actions/cache@v3
2523
with:
@@ -29,10 +27,23 @@ jobs:
2927
~/.clojure
3028
~/.cpcache
3129
key: ${{ runner.os }}-${{ hashFiles('**/deps.edn') }}
30+
3231
- name: Run Tests
3332
run: clojure -T:build ci
33+
3434
- name: Deploy Release
35+
id: deploy
3536
run: clojure -T:build deploy
3637
env:
37-
CLOJARS_PASSWORD: ${{secrets.DEPLOY_TOKEN}}
38-
CLOJARS_USERNAME: ${{secrets.DEPLOY_USERNAME}}
38+
CLOJARS_PASSWORD: ${{secrets.CLOJARS_PASSWORD}}
39+
CLOJARS_USERNAME: ${{secrets.CLOJARS_USERNAME}}
40+
41+
- uses: actions/create-release@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
tag_name: v${{ steps.deploy.outputs.version }}
46+
release_name: v${{ steps.deploy.outputs.version }}
47+
body: Release v${{ steps.deploy.outputs.version }}
48+
draft: false
49+
prerelease: false

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 0.0.2 - 2022-08-03
4+
5+
### Added
6+
- Support for ClojureScript
7+
38
## 0.0.1 - 2022-07-23
49

510
### Added

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
# graphcom
22
![Clojars Project](https://img.shields.io/clojars/v/io.github.bortexz/graphcom.svg)
33

4-
Dependency graph computations for Clojure, for building composable computations that depend on other computations. It will store the value of each computation node, and feed it into the next computation.
4+
Dependency graph computations for Clojure(Script). Build composable computations as nodes of a graph, that can depend on other nodes of the graph as their inputs. You can also refeed the previous graph result into the next computation, allowing nodes to use their previously calculated values on next computation.
55

6-
Use case: Rolling moving averages over timeseries where you only want to calculate the latest value added, but keep up to N latest values to be used to calculate the next value (e.g Exponential moving averages depend on their previous values), or be used in downstream computations.
6+
Example use case: Rolling moving averages over timeseries where you only want to calculate the latest value added, but keep up to N latest values to be used to calculate the next value (e.g Exponential moving averages depend on their previous values), or be used in downstream computations.
77

88
## Install
99

1010
### Clojure CLI/deps.edn
1111
```clojure
12-
io.github.bortexz/graphcom {:mvn/version "0.0.1"}
12+
io.github.bortexz/graphcom {:mvn/version "0.1.0"}
13+
```
14+
15+
### Leiningen/Boot
16+
```clojure
17+
[io.github.bortexz/graphcom "0.0.1"]
1318
```
1419

1520
## Quick Example

build.clj

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
[clojure.edn :as edn]
55
[org.corfield.build :as bb]))
66

7-
(def release (edn/read-string (slurp "release.edn")))
7+
(def lib 'io.github.bortexz/graphcom)
8+
(def version "0.1.0")
89

9-
(def lib (symbol (:group-id release) (:artifact-id release)))
10-
(def version (:version release))
10+
(defn- gha-output
11+
[k v]
12+
(println (str "::set-output name=" k "::" v)))
1113

1214
(defn test "Run the tests." [opts]
1315
(bb/run-tests opts)
@@ -18,7 +20,7 @@
1820
(assoc :lib lib :version version)
1921
(bb/run-tests)
2022
(bb/clean)
21-
(assoc :src-pom "template/pom.xml")
23+
(assoc :src-pom "pom-template.xml")
2224
(bb/jar)))
2325

2426
(defn install "Install the JAR locally." [opts]
@@ -29,9 +31,5 @@
2931
(defn deploy "Deploy the JAR to Clojars." [opts]
3032
(-> opts
3133
(assoc :lib lib :version version)
32-
(bb/deploy)))
33-
34-
(defn tag-version
35-
"Creates a new git lightweight tag with the current version."
36-
[_]
37-
(b/git-process {:git-args ["tag" (str "v" version)]}))
34+
(bb/deploy))
35+
(gha-output "version" version))

template/pom.xml renamed to pom-template.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<name>graphcom</name>
5-
<description>Dependency graph computations for Clojure</description>
5+
<description>Dependency graph computations for Clojure(Script)</description>
66
<url>https://github.com/bortexz/graphcom</url>
77
<licenses>
88
<license>

release.edn

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)