Skip to content

Commit 0ea6d69

Browse files
Unified Release Scripts
1 parent 9bf7f71 commit 0ea6d69

File tree

3 files changed

+78
-96
lines changed

3 files changed

+78
-96
lines changed

.github/workflows/release.maven.yml

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

.github/workflows/release.npm.yml

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

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: Release
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
java_version:
8+
description: Java version to use
9+
type: string
10+
required: false
11+
default: "17"
12+
branch:
13+
description: "The branch to checkout when cutting the release."
14+
required: true
15+
default: "main"
16+
releaseVersion:
17+
description: "Version of the release."
18+
required: true
19+
default: "X.Y.Z"
20+
developmentVersion:
21+
description: "Version to use for new local working copy."
22+
required: true
23+
default: "X.Y+1.Z"
24+
25+
jobs:
26+
maven-release:
27+
uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@main
28+
with:
29+
branch: ${{ github.event.inputs.branch }}
30+
releaseVersion: ${{ github.event.inputs.releaseVersion }}
31+
developmentVersion: "${{ github.event.inputs.developmentVersion }}-SNAPSHOT"
32+
secrets:
33+
ossrh_username: ${{ secrets.OSSRH_USERNAME }}
34+
ossrh_password: ${{ secrets.OSSRH_PASSWORD }}
35+
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
36+
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
37+
sonar_token: ${{ secrets.SONAR_TOKEN }}
38+
npm_release:
39+
needs: [ maven-release ]
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v3
44+
45+
- name: Setup Node.js (LTS)
46+
uses: actions/setup-node@v3
47+
with:
48+
node-version: 'lts/*'
49+
50+
- name: Update package.json to release version
51+
working-directory: ./typescript
52+
run: npm version ${{ github.event.inputs.releaseVersion }} --allow-same-version --no-git-tag-version
53+
54+
- name: Install dependencies
55+
working-directory: ./typescript
56+
run: npm install
57+
58+
- name: Build package
59+
working-directory: ./typescript
60+
run: npm run build
61+
62+
- name: Publish package
63+
uses: JS-DevTools/npm-publish@v3
64+
with:
65+
token: ${{ secrets.NPM_TOKEN }}
66+
package: ./typescript
67+
68+
- name: Update package.json to development version
69+
working-directory: ./typescript
70+
run: npm version ${{ github.event.inputs.developmentVersion }} --no-git-tag-version
71+
72+
- name: Push development version commit
73+
run: |
74+
git config user.name github-actions
75+
git config user.email github-actions@github.com
76+
git commit -am "Update to development version ${{ github.event.inputs.developmentVersion }}"
77+
git push
78+

0 commit comments

Comments
 (0)