IBM i build new release #13
Workflow file for this run
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
# This workflow will build the jar file and upload it as a release asset. | |
# It can be triggered by creating a tagged release on GitHub. | |
name: IBM i build new release | |
on: | |
release: | |
types: [created] | |
env: | |
remote_build_dir: /home/${{ secrets.IBMI_USER }}/build/${{ github.sha }}/ | |
jar_file: manzan-installer-${{ github.ref_name }}.jar | |
build_lib: MANZANBLD | |
dist_lib: MANZAN | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: OSSBUILD | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
always-auth: true | |
- name: Install NPM Dependencies | |
run: npm i -g @ibm/ibmi-ci | |
- name: Get short SHA ID | |
run: | | |
echo "short_sha=$(echo ${{ github.sha }} | head -c 7)" >> $GITHUB_ENV | |
cat $GITHUB_ENV | |
- name: Clean up Unnecessary Files | |
run: rm -fr ./.git ./docs | |
- name: Deploy to IBM i | |
run: | | |
ici \ | |
--rcwd "${{ env.remote_build_dir }}" \ | |
--push "." \ | |
--cmd "/QOpenSys/pkgs/bin/gmake --jobs=1 ${{ env.jar_file }}" \ | |
--pull "." \ | |
--ignore --cl "dltlib ${{ env.build_lib }}" \ | |
--ignore --cl "dltlib ${{ env.dist_lib }}" \ | |
--rcwd ".." \ | |
--ignore --cmd "rm -fr ${{ env.remote_build_dir }} /QOpenSys/etc/manzan /opt/manzan" | |
env: | |
IBMI_HOST: ${{ secrets.IBMI_HOST }} | |
IBMI_USER: ${{ secrets.IBMI_USER }} | |
IBMI_PASSWORD: ${{ secrets.IBMI_PASSWORD }} | |
IBMI_SSH_PORT: ${{ secrets.IBMI_SSH_PORT }} | |
- name: Get Release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload JAR to Release | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./${{ env.jar_file }} | |
asset_name: ${{ env.jar_file }} | |
asset_content_type: application/zip |