Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
duruer committed Feb 28, 2024
0 parents commit 6bbfb24
Show file tree
Hide file tree
Showing 34 changed files with 2,248 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Parsek Balance Plugin Release

on:
push:
branches: [ "dev", "main" ]

permissions:
contents: read

jobs:
get-next-version:
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: "lts/*"

- name: Dry run to get next release version
id: get-next-version
run: |
export NEXT_TAG_VERSION=$(npx semantic-release --dry-run | grep 'next release version is ' | awk -F"next release version is " '{print $2}')
echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}

- name: Echo new_tag_version
run: |
echo "Extracted Tag Version: ${{ steps.get-next-version.outputs.new_tag_version }}"
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
outputs:
new_tag_version: ${{ steps.get-next-version.outputs.new_tag_version }}

build-and-release:
runs-on: ubuntu-latest
needs: get-next-version
if: ${{needs.get-next-version.outputs.new_tag_version != ''}}
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8

- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: |
build
-Pversion=${{ needs.get-next-version.outputs.new_tag_version }}
-PtimeStamp=${{ steps.time.outputs.time }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
run: npx semantic-release
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.gradle
.idea
.vertx
build
.directory

config.json
config.conf

/*.jar

.docker

file-uploads

clickhouse/database
29 changes: 29 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"branches": [
{
"name": "dev",
"prerelease": true
},
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": [
{
"path": "build/libs/*.jar",
"label": false
},
{
"path": "LICENSE",
"label": false
}
]
}
]
],
"repositoryUrl": "https://github.com/StatuParsek/parsek-plugin-balance.git"
}
Loading

0 comments on commit 6bbfb24

Please sign in to comment.