Skip to content

Commit

Permalink
Release automation
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenLooman committed Nov 14, 2023
1 parent 437418f commit cb457a3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint, build and test
name: Lint and package
on:
push:
branches:
Expand All @@ -8,7 +8,7 @@ on:

jobs:
build:
name: Build and test
name: Build, test and package
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Package and create a release with assets
on:
push:
tags:
- "*"

jobs:
build:
name: Package and create a release with assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
cache: 'maven'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Test and package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode --update-snapshots package
- run: mkdir staging && cp **/target/*.jar staging
- run: cd magik-language-server/client-vscode && npm install . && npm run package
- run: cp magik-language-server/client-vscode/magik-language-server-*.vsix staging

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
staging/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $ mvn -B versions:set -DnewVersion=<version> -DgenerateBackupPoms=false

Be sure to also update the symbolic links in `magik-language-server/client-vscode/server`. Then update `magik-language-server/client-vscode/client/src/const.ts`, and `magik-language-server/client-vscode/client/package.json` and related package files.

Creation and uploading of artifacts is currently done by hand.
Then, create a release by pushing a new tag to Github.

### SonarCloud

Expand Down

0 comments on commit cb457a3

Please sign in to comment.