Skip to content

Commit 2802018

Browse files
authored
ci: fix release workflow (#112)
1 parent 307d362 commit 2802018

5 files changed

Lines changed: 85 additions & 74 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release Stencil Java Client
2+
on:
3+
push:
4+
tags:
5+
- "v*.*.*"
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish-java-client:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK 8
14+
uses: actions/setup-java@v2
15+
with:
16+
distribution: adopt
17+
java-version: 8
18+
- name: Publish java client
19+
run: |
20+
printf "$GPG_SIGNING_KEY" | base64 --decode > private.key
21+
./gradlew clean publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId=${GPG_SIGNING_KEY_ID} -Psigning.password=${GPG_SIGNING_PASSWORD} -Psigning.secretKeyRingFile=private.key --console=verbose
22+
working-directory: clients/java
23+
env:
24+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
25+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
26+
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
27+
GPG_SIGNING_KEY_ID: ${{ secrets.GPG_SIGNING_KEY_ID }}
28+
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Stencil JS Client
2+
on:
3+
push:
4+
tags:
5+
- "v*.*.*"
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish-js-client:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "12.x"
16+
registry-url: "https://registry.npmjs.org"
17+
scope: "@odpf"
18+
- run: npm install
19+
working-directory: clients/js
20+
- run: npm publish --access public
21+
working-directory: clients/js
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release Stencil Server
2+
on:
3+
push:
4+
tags:
5+
- "v*.*.*"
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish-server:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- name: Set up Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: "1.16"
20+
- name: Login to DockerHub
21+
uses: docker/login-action@v1
22+
with:
23+
registry: docker.io
24+
username: ${{ secrets.DOCKERHUB_USERNAME }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v2.6.1
28+
with:
29+
distribution: goreleaser
30+
version: latest
31+
args: --rm-dist
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}

.github/workflows/release.yml

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

clients/java/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ plugins {
66
id 'maven-publish'
77
id 'com.google.protobuf' version '0.8.15'
88
id 'io.freefair.lombok' version '5.3.3.3'
9-
id 'com.palantir.git-version' version '0.12.3'
109
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
1110
}
1211

1312
group 'io.odpf'
14-
version gitVersion().substring(1)
13+
version '0.2.0'
1514

1615
repositories {
1716
mavenLocal()

0 commit comments

Comments
 (0)