Skip to content

Commit be1073b

Browse files
committed
Create initial release
1 parent b18a6bc commit be1073b

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ jobs:
5858
persist-credentials: false
5959
- name: Coursier cache
6060
uses: useblacksmith/coursier-cache-action@v6
61+
- uses: taiki-e/install-action@parse-changelog
62+
- name: Set build timestamp
63+
run: echo "SOURCE_DATE_EPOCH=$(date -d $(parse-changelog CHANGELOG.md -t | rev | cut -d' ' -f1 | rev) '+%s')" >> "$GITHUB_ENV"
6164
- uses: coursier/setup-action@v1
6265
with:
6366
jvm: zulu:11.0.10
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
workflow_run:
5+
workflows: [CI]
6+
types: [completed]
7+
8+
jobs:
9+
check:
10+
runs-on: blacksmith-2vcpu-ubuntu-2204
11+
if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'v') }}
12+
outputs:
13+
status: ${{ steps.check.conclusion }}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-tags: true
19+
persist-credentials: false
20+
- id: check
21+
name: Verify that the ref is a tag (and not just a branch starting with "v")
22+
run: git show-ref --verify refs/tags/${{ github.event.workflow_run.head_branch }}
23+
24+
release:
25+
runs-on: blacksmith-2vcpu-ubuntu-2204
26+
needs: check
27+
if: needs.check.outputs.status == 'success'
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
persist-credentials: false
33+
- uses: taiki-e/install-action@parse-changelog
34+
- name: Generate Changelog
35+
run: parse-changelog CHANGELOG.md > ${{ github.workspace }}-CHANGELOG.md
36+
- name: Download JAR
37+
uses: actions/download-artifact@v4
38+
with:
39+
name: jsonoid-server.jar
40+
github-token: ${{ secrets.GH_PAT }}
41+
run-id: ${{ github.event.workflow_run.id }}
42+
- name: Make source archive
43+
run: git archive --format tar.gz --prefix=jsonoid-server-${{ github.event.workflow_run.head_branch }}/ HEAD > jsonoid-server-${{ github.event.workflow_run.head_branch }}.tar.gz
44+
- name: Release
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
body_path: ${{ github.workspace }}-CHANGELOG.md
48+
files: |
49+
jsonoid-server*.jar
50+
jsonoid-server-*.tar.gz
51+
fail_on_unmatched_files: true
52+
tag_name: ${{ github.event.workflow_run.head_branch }}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - 2025-03-06
11+
### Added
12+
- Initial release with basic JSON schema discovery
13+
14+
[Unreleased]: https://github.com/dataunitylab/jsonoid-discovery/compare/v0.1.0...HEAD
15+
[0.1.0]: https://github.com/dataunitylab/jsonoid-discovery/releases/tag/v0.1.0

0 commit comments

Comments
 (0)