Issue 240: Fix — floor
/ceil
/round
now return integers & abs
now returns int/float dependent on input
#257
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
name: Build & Release FlavorLang | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
release: | |
types: [created] | |
jobs: | |
build: | |
name: Build FlavorLang | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
# Checkout the repository | |
- uses: actions/checkout@v4 | |
# Set up Node.js for VS Code extension build | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
# Build the VS Code extension | |
- name: Build VS Code extension | |
working-directory: vscode-extension | |
run: | | |
npm ci | |
npm audit fix --force || true | |
npx @vscode/vsce package | |
# Build the FlavorLang interpreter | |
- name: Build FlavorLang interpreter | |
working-directory: src | |
run: make | |
# Prepare release package | |
- name: Prepare release package | |
run: | | |
# Create staging directory | |
mkdir -p staging/autocomplete | |
# Copy VS Code extension | |
cp vscode-extension/*.vsix staging/flavorlang-extension-${{ matrix.os }}.vsix | |
# Copy FlavorLang binary | |
cp src/flavor staging/flavor | |
chmod +x staging/flavor | |
# Copy install script based on OS | |
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then | |
cp scripts/install_macos.sh staging/install.sh | |
else | |
cp scripts/install_ubuntu.sh staging/install.sh | |
fi | |
chmod +x staging/install.sh | |
# Copy autocomplete scripts | |
cp scripts/autocomplete/* staging/autocomplete/ | |
# Create ZIP package | |
cd staging | |
zip -r ../flavorlang-${{ matrix.os }}.zip ./* | |
# Upload artifact | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: flavorlang-${{ matrix.os }} | |
path: flavorlang-${{ matrix.os }}.zip | |
release: | |
needs: build | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
steps: | |
# Download build artifacts | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./artifacts | |
# Upload artifacts to the release | |
- name: Upload to GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./artifacts/**/flavorlang-ubuntu-latest.zip | |
./artifacts/**/flavorlang-macos-latest.zip |