I'm new to Github Actions and trying to figure out some basic processing. What I want to do is when I commit to my Java repo, Github Actions triggers a maven build which generates the Java JAR file. I then want to reference the JAR file in the next step of the workflow to deploy via SSH to a Cloud Server.
What I'm missing and can't find any current documentation to, is how I know the location of the generated JAR file when Github is generating it on its temporary VM. Below is the Github Actions script I currently have.
The very bottom portion with "source" is where I'm unsure what to provide.
Thank you.
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: copy file via ssh key
uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.KEY }}
with:
**source: "./bla.jar"**
target: "/usr/test/"