Skip to content

Commit

Permalink
Update Build Publish worflow to follow new standard
Browse files Browse the repository at this point in the history
This is copied from the build workflow to keep the same standard. I
think there is a way to combine these workflows but only run the publish
step conditionally but I am not going to focus on that yet
  • Loading branch information
sclaiborne committed May 1, 2024
1 parent f20d1a5 commit 2d41cac
Showing 1 changed file with 37 additions and 57 deletions.
94 changes: 37 additions & 57 deletions .github/workflows/buildPublish.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,39 @@
# This workflow will run build an AS project and publish the libraries to the github package registry

# This workflow will run build an AS project and publish the libraries to the github package registry

name: Build Publish Libraries

on:
push:
branches:
- main
tags:
- v*


jobs:
build-publish-libraries:

on:
push:
branches:
- main
tags:
- v*

jobs:
build-publish-libraries:
runs-on: [AS411]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
path: "main"
lfs: true
- uses: actions/checkout@v4
with:
repository: "loupeteam/ASPython"
submodules: 'true'
ref: "bugfix/pvi-error-code"
path: "AsPython"
- uses: actions/checkout@v4
with:
repository: "loupeteam/LPM"
submodules: 'true'
ref: "main"
path: "LPM"
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- name: Fix LFS
run: |
cd ./main
git lfs pull
- name: Install AS upgrades
shell: pwsh
run: |
Set-Location -Path ./main/upgrades
& $PWD/install.ps1
- run: python.exe ./AsPython/CmdLineBuild.py ./main/example/AsProject/AsProject.apj -c Intel ARM -bm Rebuild -sim --logLevel DEBUG
- run: python.exe ./AsPython/CmdLineExportLib.py ./main/example/AsProject/AsProject.apj -dest ./libs -c Intel ARM -wl vartools -l DEBUG -o -bm "None"
- uses: ./AsGithubAction
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
cd ./libs/vartools
python.exe ${{ github.workspace }}/LPM/src/LPM.py login -s -t ${{ secrets.GITHUB_TOKEN }} -nc
python.exe ${{ github.workspace }}/LPM/src/LPM.py init -s -lib -nc
python.exe ${{ github.workspace }}/LPM/src/LPM.py publish -s -nc
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
path: "main"
lfs: true
- name: Fix LFS
run: |
cd ./main
git lfs pull
- name: Install AS upgrades
run: python.exe C:/Tools/AsPython/InstallUpgrades.py ${{ github.workspace }}/main/upgrades -asp AS411 -r --logLevel DEBUG
- name: Build project
run: python.exe C:/Tools/AsPython/CmdLineBuild.py ${{ github.workspace }}/main/example/AsProject/AsProject.apj -c Intel ARM -bm Rebuild -sim --logLevel DEBUG
- name: Export libraries
run: python.exe C:/Tools/AsPython/CmdLineExportLib.py ${{ github.workspace }}/main/example/AsProject/AsProject.apj -dest ./libs -c Intel ARM -wl vartools -l DEBUG -o -bm "None"
- name: Publish libraries
run: |
cd ./libs/vartools
python.exe C:/Tools/LPM/src/LPM.py login -s -t ${{ secrets.GITHUB_TOKEN }} -nc
python.exe C:/Tools/LPM/src/LPM.py init -s -lib -nc
python.exe C:/Tools/LPM/src/LPM.py publish -s -nc

0 comments on commit 2d41cac

Please sign in to comment.