Create package on push to release branch #119
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
name: Create package on push to release branch | |
on: | |
push: | |
branches: [ release ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/Hydrogen' | |
# Do npm install and build steps for YAMCS webapp. | |
- name: Install dependencies and build frontend | |
run: | | |
echo ${{ github.workspace }} | |
cd ${{ github.workspace }}/yamcs-web/src/main/webapp | |
npm install | |
npm run build | |
- name: Set up Java 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v4.5 | |
with: | |
maven-version: 3.8.2 | |
- name: Build with Maven | |
run: mvn clean install -DskipTests | |
- name: Publish to GitHub Packages Apache Maven | |
run: mvn deploy -DskipTests -s $GITHUB_WORKSPACE/settings.xml | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |