-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from joernio/andrei/release-scripts
[Workflows] PR and Release scripts
- Loading branch information
Showing
2 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: pr | ||
on: pull_request | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.sbt | ||
~/.coursier | ||
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }} | ||
- name: Compile and run tests | ||
run: sbt clean test | ||
formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.sbt | ||
~/.coursier | ||
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }} | ||
- name: Check formatting | ||
run: sbt scalafmtCheck Test/scalafmtCheck | ||
- run: echo "Previous step failed because code is not formatted. Run 'sbt scalafmt Test/scalafmt'" | ||
if: ${{ failure() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: release | ||
on: | ||
push: | ||
branches: [master, main] | ||
tags: ["*"] | ||
paths-ignore: ['**.md'] | ||
workflow_dispatch: #allows manual trigger | ||
|
||
concurrency: production | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- name: Get next release version (dry run) | ||
id: taggerDryRun | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DRY_RUN: true | ||
- name: echo new tag | ||
run: | | ||
export NEXT_VERSION=${{ steps.taggerDryRun.outputs.new_tag }} | ||
echo "The next tag version will be: $NEXT_VERSION" | ||
- name: echo tag | ||
run: | | ||
echo "The current tag is: ${{ steps.taggerDryRun.outputs.tag }}" | ||
- name: Compile | ||
run: sbt clean stage | ||
- name: Generate Ruby Types | ||
run: ./joern-benchmarks-datasets ALL | ||
- name: Rename | ||
run: | | ||
mv workspace/ichnaea.zip ichnaea.zip | ||
- name: Set next release version | ||
id: taggerFinal | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.taggerDryRun.outputs.new_tag }} | ||
files: | | ||
ichnaea.zip |