Matrix operations and statistical functions based on it #1070
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: Build CREXX | |
on: [push] | |
jobs: | |
#**************************************************# | |
build-ubuntu: | |
name: Build for Ubuntu | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Determine Release Name | |
run: | | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == refs/heads/develop ]]; then | |
echo "RELEASE_ID=dev-snapshot" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" =~ ^refs/heads/feature/.*$ ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/heads/feature/}" >> $GITHUB_ENV | |
else | |
echo "Skip release" | |
fi | |
- name: Get Regina | |
run: | | |
sudo apt-get install --no-install-recommends -y regina-rexx | |
shell: bash | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: CMAKE Build Debug | |
uses: lukka/run-cmake@v3 | |
with: | |
# Select the build configuration, typically Debug or Release. | |
cmakeBuildType: Debug # optional, default is Debug | |
buildDirectory: "${{ runner.temp }}/debug" | |
- name: CMAKE Build Release | |
uses: lukka/run-cmake@v3 | |
with: | |
# Select the build configuration, typically Debug or Release. | |
cmakeBuildType: MinSizeRel # optional, default is Debug | |
buildDirectory: "${{ runner.temp }}/release" | |
- name: Get Executables | |
run: | | |
mkdir -p "${{ runner.temp }}/exe" | |
mkdir -p "${{ runner.temp }}/exe/release" | |
mkdir -p "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/release/compiler/rxc" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/assembler/rxas" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/disassembler/rxdas" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/debugger/rxdb" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxvm" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxbvm" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxvme" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxbvme" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/librxbvml.a" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/librxvml.a" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/debug/compiler/rxc" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/assembler/rxas" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/disassembler/rxdas" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/debugger/rxdb" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxvm" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxbvm" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxvme" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxbvme" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/librxbvml.a" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/librxvml.a" "${{ runner.temp }}/exe/debug" | |
cp LICENSE "${{ runner.temp }}/exe" | |
cp README.md "${{ runner.temp }}/exe" | |
cp SECURITY.md "${{ runner.temp }}/exe" | |
cp history.txt "${{ runner.temp }}/exe" | |
shell: bash | |
- name: Sanity Check | |
working-directory: ${{ runner.temp }}/exe | |
run: | | |
./release/rxc -v | |
./release/rxas -v | |
./release/rxdas -v | |
./release/rxdb -v | |
./release/rxvm -v | |
./release/rxbvm -v | |
./release/rxvme -v | |
./release/rxbvme -v | |
./debug/rxc -v | |
./debug/rxas -v | |
./debug/rxdas -v | |
./debug/rxdb -v | |
./debug/rxvm -v | |
./debug/rxbvm -v | |
./debug/rxvme -v | |
./debug/rxbvme -v | |
shell: bash | |
- name: Build CMS lexers | |
run: | | |
${{ runner.temp }}/release/re2c/re2c -I S370 -o S370/rxasscan.c assembler/rxasscan.re | |
${{ runner.temp }}/release/re2c/re2c -I S370 -o S370/rxcposcn.c compiler/rxcposcn.re | |
${{ runner.temp }}/release/re2c/re2c -I S370 -o S370/rexbscan.c compiler/rxcpbscn.re | |
shell: bash | |
- name: Upload Executable | |
if: env.RELEASE_ID | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CREXX-Ubuntu | |
path: | | |
${{ runner.temp }}/exe | |
${{ runner.temp }}/exe/debug | |
${{ runner.temp }}/exe/release | |
- name: Upload instrmiss.h | |
uses: actions/upload-artifact@v4 | |
with: | |
name: instrmiss.h | |
path: ${{ runner.temp }}/release/machine/instrmiss.h | |
- name: Upload instrset.h | |
uses: actions/upload-artifact@v4 | |
with: | |
name: instrset.h | |
path: ${{ runner.temp }}/release/machine/instrset.h | |
- name: Upload rxasscan.c | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxasscan.c | |
path: ${{ runner.temp }}/release/assembler/rxasscan.c | |
- name: Upload rxasscan.c.s370 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxasscan.c.s370 | |
path: S370/rxasscan.c | |
- name: Upload rxasgrmr.c | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxasgrmr.c | |
path: ${{ runner.temp }}/release/assembler/rxasgrmr.c | |
- name: Upload rxasgrmr.h | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxasgrmr.h | |
path: ${{ runner.temp }}/release/assembler/rxasgrmr.h | |
- name: Upload rxcposcn.c | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxcposcn.c | |
path: ${{ runner.temp }}/release/compiler/rxcposcn.c | |
- name: Upload rxcposcn.c.s370 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxcposcn.c.s370 | |
path: S370/rxcposcn.c | |
- name: Upload rxcpopgr.c | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxcpopgr.c | |
path: ${{ runner.temp }}/release/compiler/rxcpopgr.c | |
- name: Upload rxcpopgr.h | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxcpopgr.h | |
path: ${{ runner.temp }}/release/compiler/rxcpopgr.h | |
- name: Upload rexbscan.c | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rexbscan.c | |
path: ${{ runner.temp }}/release/compiler/rexbscan.c | |
- name: Upload rexbscan.c.s370 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rexbscan.c.s370 | |
path: S370/rexbscan.c | |
- name: Upload rxcpbgmr.c | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxcpbgmr.c | |
path: ${{ runner.temp }}/release/compiler/rxcpbgmr.c | |
- name: Upload rxcpbgmr.h | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rxcpbgmr.h | |
path: ${{ runner.temp }}/release/compiler/rxcpbgmr.h | |
#**************************************************# | |
build-cms: | |
name: Build for CMS | |
runs-on: [ubuntu-latest] | |
needs: [build-ubuntu] | |
container: adriansutherland/vm370:builder | |
steps: | |
- name: Determine Release Name | |
run: | | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == refs/heads/develop ]]; then | |
echo "RELEASE_ID=dev_snapshot" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" =~ ^refs/heads/feature/.*$ ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/heads/feature/}" >> $GITHUB_ENV | |
else | |
echo "Skip release" | |
fi | |
shell: bash | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download instrmiss.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: instrmiss.h | |
path: machine | |
- name: Download instrset.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: instrset.h | |
path: machine | |
- name: Download rxasscan.c.s370 | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxasscan.c.s370 | |
path: S370 | |
- name: Download rxasgrmr.c | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxasgrmr.c | |
path: assembler | |
- name: Download rxasgrmr.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxasgrmr.h | |
path: assembler | |
- name: Download rxcposcn.c.s370 | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxcposcn.c.s370 | |
path: S370 | |
- name: Download rxcpopgr.c | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxcpopgr.c | |
path: compiler | |
- name: Download rxcpopgr.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxcpopgr.h | |
path: compiler | |
- name: Download rexbscan.c.s370 | |
uses: actions/download-artifact@v4 | |
with: | |
name: rexbscan.c.s370 | |
path: S370 | |
- name: Download rxcpbgmr.c | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxcpbgmr.c | |
path: compiler | |
- name: Download rxcpbgmr.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: rxcpbgmr.h | |
path: compiler | |
- name: Move Source | |
run: | | |
mkdir /opt/hercules/vm370/io | |
mv * /opt/hercules/vm370/io | |
shell: bash | |
- name: Build | |
working-directory: /opt/hercules/vm370 | |
run: | | |
chmod -R ugo+rw * | |
hercules -f hercules.conf -d >/dev/null 2>/dev/null & | |
cd io/S370 | |
chmod +x *.sh | |
echo "Running CMSBUILD" | |
./cmsbuild.sh | |
shell: bash | |
- name: Get Executable | |
run: | | |
mkdir -p exe | |
cp /opt/hercules/vm370/io/crexxbin.aws exe | |
cp /opt/hercules/vm370/io/crexxsrc.aws exe | |
cp /opt/hercules/vm370/io/crexxbin.vmarc exe | |
cp /opt/hercules/vm370/io/crexxsrc.vmarc exe | |
cp /opt/hercules/vm370/io/LICENSE exe | |
cp /opt/hercules/vm370/io/README.md exe | |
cp /opt/hercules/vm370/io/SECURITY.md exe | |
cp /opt/hercules/vm370/io/S370/cmsinstall.sh exe | |
cp /opt/hercules/vm370/io/history.txt exe | |
chmod -R ugo+r exe | |
shell: bash | |
- name: Upload Executable | |
if: env.RELEASE_ID | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CREXX-CMS | |
path: ./exe | |
#**************************************************# | |
build-windows: | |
name: Build for Windows | |
runs-on: [windows-latest] | |
needs: [build-ubuntu] | |
steps: | |
- name: Update Toolchain (MSYS2) | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
base-devel | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
- name: Determine Release Name | |
run: | | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == refs/heads/develop ]]; then | |
echo "RELEASE_ID=dev_snapshot" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" =~ ^refs/heads/feature/.*$ ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/heads/feature/}" >> $GITHUB_ENV | |
else | |
echo "Skip release" | |
fi | |
shell: bash | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Download instrmiss.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: instrmiss.h | |
path: machine | |
- name: Download instrset.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: instrset.h | |
path: machine | |
- name: Build Debug | |
shell: msys2 {0} | |
run: | | |
cmake -G Ninja -B "${{ runner.temp }}/debug" -DCMAKE_BUILD_TYPE=Debug | |
cmake --build "${{ runner.temp }}/debug" | |
- name: Build Release | |
shell: msys2 {0} | |
run: | | |
cmake -G Ninja -B "${{ runner.temp }}/release" -DCMAKE_BUILD_TYPE=MinSizeRel | |
cmake --build "${{ runner.temp }}/release" | |
- name: Get Executable | |
run: | | |
mkdir -p "${{ runner.temp }}/exe" | |
mkdir -p "${{ runner.temp }}/exe/release" | |
mkdir -p "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/release/compiler/rxc.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/assembler/rxas.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/disassembler/rxdas.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/debugger/rxdb.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxvm.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxbvm.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxvme.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxbvme.exe" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/librxbvml.a" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/librxvml.a" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/debug/compiler/rxc.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/assembler/rxas.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/disassembler/rxdas.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/debugger/rxdb.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxvm.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxbvm.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxvme.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxbvme.exe" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/librxbvml.a" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/librxvml.a" "${{ runner.temp }}/exe/debug" | |
cp LICENSE "${{ runner.temp }}/exe" | |
cp README.md "${{ runner.temp }}/exe" | |
cp SECURITY.md "${{ runner.temp }}/exe" | |
cp history.txt "${{ runner.temp }}/exe" | |
shell: bash | |
- name: Sanity Check | |
working-directory: ${{ runner.temp }}/exe | |
run: | | |
./release/rxc -v | |
./release/rxas -v | |
./release/rxdas -v | |
./release/rxdb -v | |
./release/rxvm -v | |
./release/rxbvm -v | |
./release/rxvme -v | |
./release/rxbvme -v | |
./debug/rxc -v | |
./debug/rxas -v | |
./debug/rxdas -v | |
./debug/rxdb -v | |
./debug/rxvm -v | |
./debug/rxbvm -v | |
./debug/rxvme -v | |
./debug/rxbvme -v | |
shell: bash | |
- name: Upload Executable | |
if: env.RELEASE_ID | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CREXX-Windows | |
path: | | |
${{ runner.temp }}/exe | |
${{ runner.temp }}/exe/debug | |
${{ runner.temp }}/exe/release | |
#**************************************************# | |
build-macos: | |
name: Build for MacOS | |
runs-on: [macos-latest] | |
needs: [build-ubuntu] | |
steps: | |
- name: Determine Release Name | |
run: | | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == refs/heads/develop ]]; then | |
echo "RELEASE_ID=dev_snapshot" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" =~ ^refs/heads/feature/.*$ ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/heads/feature/}" >> $GITHUB_ENV | |
else | |
echo "Skip release" | |
fi | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Download instrmiss.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: instrmiss.h | |
path: machine | |
- name: Download instrset.h | |
uses: actions/download-artifact@v4 | |
with: | |
name: instrset.h | |
path: machine | |
- name: CMAKE Build Debug | |
uses: lukka/run-cmake@v3 | |
with: | |
# Select the build configuration, typically Debug or Release. | |
cmakeBuildType: Debug # optional, default is Debug | |
buildDirectory: "${{ runner.temp }}/debug" | |
- name: CMAKE Build Release | |
uses: lukka/run-cmake@v3 | |
with: | |
# Select the build configuration, typically Debug or Release. | |
cmakeBuildType: MinSizeRel # optional, default is Debug | |
buildDirectory: "${{ runner.temp }}/release" | |
- name: Get Executable | |
run: | | |
mkdir -p "${{ runner.temp }}/exe" | |
mkdir -p "${{ runner.temp }}/exe/release" | |
mkdir -p "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/release/compiler/rxc" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/assembler/rxas" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/disassembler/rxdas" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/debugger/rxdb" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxvm" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxbvm" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxvme" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/rxbvme" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/librxbvml.a" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/release/interpreter/librxvml.a" "${{ runner.temp }}/exe/release" | |
cp "${{ runner.temp }}/debug/compiler/rxc" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/assembler/rxas" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/disassembler/rxdas" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/debugger/rxdb" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxvm" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxbvm" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxvme" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/rxbvme" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/librxbvml.a" "${{ runner.temp }}/exe/debug" | |
cp "${{ runner.temp }}/debug/interpreter/librxvml.a" "${{ runner.temp }}/exe/debug" | |
cp LICENSE "${{ runner.temp }}/exe" | |
cp README.md "${{ runner.temp }}/exe" | |
cp SECURITY.md "${{ runner.temp }}/exe" | |
cp history.txt "${{ runner.temp }}/exe" | |
shell: bash | |
- name: Sanity Check | |
working-directory: ${{ runner.temp }}/exe | |
run: | | |
./release/rxc -v | |
./release/rxas -v | |
./release/rxdas -v | |
./release/rxdb -v | |
./release/rxvm -v | |
./release/rxbvm -v | |
./release/rxvme -v | |
./release/rxbvme -v | |
./debug/rxc -v | |
./debug/rxas -v | |
./debug/rxdas -v | |
./debug/rxdb -v | |
./debug/rxvm -v | |
./debug/rxbvm -v | |
./debug/rxvme -v | |
./debug/rxbvme -v | |
shell: bash | |
- name: Upload Executable | |
if: env.RELEASE_ID | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CREXX-MacOS | |
path: | | |
${{ runner.temp }}/exe | |
${{ runner.temp }}/exe/debug | |
${{ runner.temp }}/exe/release | |
#**************************************************# | |
release: | |
name: Release | |
needs: [build-ubuntu, build-windows, build-cms, build-macos] | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Determine Release Name | |
run: | | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == refs/heads/develop ]]; then | |
echo "RELEASE_ID=dev_snapshot" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" =~ ^refs/heads/feature/.*$ ]]; then | |
echo "RELEASE_ID=${GITHUB_REF#refs/heads/feature/}" >> $GITHUB_ENV | |
else | |
echo "Skip release" | |
fi | |
- name: Checkout | |
if: env.RELEASE_ID | |
uses: actions/checkout@v3 | |
- name: Checkout branch and push tag | |
if: env.RELEASE_ID | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
git tag -f ${{ env.RELEASE_ID }} | |
git push -f origin ${{ env.RELEASE_ID }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get CMS binary | |
if: env.RELEASE_ID | |
uses: actions/download-artifact@v4 | |
with: | |
name: CREXX-CMS | |
path: CREXX-CMS | |
- name: ZIP CMS binary | |
run: | |
zip -r CREXX-CMS.zip CREXX-CMS | |
- name: Get ubuntu binary | |
if: env.RELEASE_ID | |
uses: actions/download-artifact@v4 | |
with: | |
name: CREXX-Ubuntu | |
path: CREXX-Ubuntu | |
- name: ZIP ubuntu binary | |
if: env.RELEASE_ID | |
run: | |
zip -r CREXX-Ubuntu.zip CREXX-Ubuntu | |
- name: Get windows binary | |
if: env.RELEASE_ID | |
uses: actions/download-artifact@v4 | |
with: | |
name: CREXX-Windows | |
path: CREXX-Windows | |
- name: ZIP windows binary | |
if: env.RELEASE_ID | |
run: | |
zip -r CREXX-Windows.zip CREXX-Windows | |
- name: Get MacOS binary | |
if: env.RELEASE_ID | |
uses: actions/download-artifact@v4 | |
with: | |
name: CREXX-MacOS | |
path: CREXX-MacOS | |
- name: ZIP MacOS binary | |
if: env.RELEASE_ID | |
run: | |
zip -r CREXX-MacOS.zip CREXX-MacOS | |
- name: Delete old release assets | |
if: env.RELEASE_ID | |
uses: mknejp/delete-release-assets@v1 | |
with: | |
tag: ${{ env.RELEASE_ID }} | |
token: ${{ github.token }} | |
fail-if-no-release: false | |
fail-if-no-assets: false | |
assets: | | |
*.zip | |
*.gz | |
- name: Create Release and Upload Assets | |
id: create_release | |
if: env.RELEASE_ID | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./CREXX-CMS.zip | |
./CREXX-Ubuntu.zip | |
./CREXX-Windows.zip | |
./CREXX-MacOS.zip | |
name: Snapshot ${{ env.RELEASE_ID }} | |
tag_name: ${{ env.RELEASE_ID }} | |
draft: false | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |