Skip to content

Copy and paste error #2

Copy and paste error

Copy and paste error #2

Workflow file for this run

name: Binary Release
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Single checkout, with submodules
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
submodules: true
- name: Print latest commit
run: echo ${{ github.sha }}
- name: "Install Zig"
run: "sudo snap install zig --classic --beta"
# Date for versioning
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Get version date
id: version_date
run: echo "date=n_$(date +'%y%m%d')" >> $GITHUB_OUTPUT
# Linux binary creation
- name: Package and create binary for Linux
run: |
mkdir -p apprunner_linux
zig build -p apprunner_linux/ --release=fast -Dtarget=x86_64-linux
zip -r apprunner_linux.zip apprunner_linux
# Windows binary creation
- name: Package and create binary for Windows
run: |
mkdir -p apprunner_windows
zig build -p apprunner_windows/--release=fast -Dtarget=x86_64-windows
zip -r apprunner_windows.zip apprunner_windows
# MacOS Binary Creation
- name: Package and create binary for MacOS
run: |
mkdir -p apprunner_macos
zig build -p apprunner_windows/--release=fast -Dtarget=x86_64-macos
zip -r apprunner_macos.zip apprunner_macos
# Changelog generation
- name: Create changelog
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
{
echo 'content<<EOF'
python3 .github/workflows/changelog.py
echo EOF
} >> "$GITHUB_OUTPUT"
id: changelog
# Release creation
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: binary-tag-${{ steps.date.outputs.date }}-${{ github.sha }}
release_name: Binary Release - ${{ steps.date.outputs.date }}
body: |
**Binary release - ${{ steps.date.outputs.date }}**
This build is the latest code changes for apprunner.
## Release notes
### Revision (${{ steps.version_date.outputs.date }}):
${{ steps.changelog.outputs.content }}
draft: false
prerelease: true
# Upload binaries (Windows)
- name: Upload Apprunner Binary Windows
id: upload-apprunner-binary-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./apprunner.zip
asset_name: apprunner${{ steps.version_date.outputs.date }}_binary_windows.zip
asset_content_type: application/zip
# Upload binaries (Linux)
- name: Upload Apprunner Binary Linux
id: upload-apprunner-binary-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./apprunner.zip
asset_name: apprunner${{ steps.version_date.outputs.date }}_binary_linux.zip
asset_content_type: application/zip
# Upload binaries (MacOS)
- name: Upload Apprunner Binary MacOS
id: upload-apprunner-binary-mac
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./apprunner.zip
asset_name: apprunner${{ steps.version_date.outputs.date }}_binary_macos.zip
asset_content_type: application/zip