Skip to content

automatic-release

automatic-release #76

name: automatic-release
on:
push:
branches:
- main
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * 6'
jobs:
pre-release:
name: Pre Release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build 64 bit version
run: cargo build --target x86_64-pc-windows-msvc --release
- name: create libmathcat64
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: '../../../libmathcat64.zip'
directory: target/x86_64-pc-windows-msvc/release
path: libmathcat_c*
- name: create rules.zip
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: '../Rules.zip'
directory: 'c-example'
path: 'Rules'
# build the test after zipping up "Rules" because the test will unzip the files needed for the test
- name: test build
run: |
cp target/x86_64-pc-windows-msvc/release/libmathcat_c.dll c-example/
cd c-example
gcc test.cpp -o test -L. -llibmathcat_c
./test.exe
- name: Build 32 bit version
run: cargo build --target i686-pc-windows-msvc --release
- name: create libmathcat32
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: '../../../libmathcat32.zip'
directory: target/i686-pc-windows-msvc/release
path: libmathcat_c*
- name: Build ARM 64 bit version
run: |
rustup target add aarch64-pc-windows-msvc
cargo build --target aarch64-pc-windows-msvc --release
- name: create arm libmathcat64
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: '../../../libmathcat-arm64-untested.zip'
directory: target/aarch64-pc-windows-msvc/release
path: libmathcat_c*
- name: Automatic release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: Development Build
files: |
libmathcat*.zip
Rules.zip
c-example/mathcat.h
c-example/mathcat-c.h
c-example/test.cpp
c-example/test.c