Skip to content

Add support for podman in the demo script #21

Add support for podman in the demo script

Add support for podman in the demo script #21

name: Nightly builds
on:
workflow_dispatch:
push:
branches:
- main
concurrency: ${{ github.workflow }}
jobs:
platfor-builds:
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
exclude:
- os: windows
arch: arm64
include:
- os: windows
archive_ext: zip
- os: linux
archive_ext: tar.gz
- os: darwin
archive_ext: tar.gz
name: "${{ matrix.os }}-${{ matrix.arch }}"
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Cross-compile
run: |
version="nightly"
gitCommit=$(git rev-parse HEAD)
buildTime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
binName="jmm-$GOOS-$GOARCH"
if [ $GOOS == "windows" ]; then
binName="${binName}.exe"
fi
go build -o "$binName" \
-ldflags="-s -w -X 'jmm/pkg/cmd/version.Version=${version}' -X 'jmm/pkg/cmd/version.GitCommit=${gitCommit}' -X 'jmm/pkg/cmd/version.BuildTime=${buildTime}'"
- name: Generate archive
run: |
if [ $GOOS == "windows" ]; then
zip -9 -y -r -q "jmm-${GOOS}-${GOARCH}.zip" "jmm-${GOOS}-${GOARCH}.exe"
else
tar -czvf "jmm-${GOOS}-${GOARCH}.tar.gz" "jmm-${GOOS}-${GOARCH}"
fi
- name: Upload artifacts
uses: WebFreak001/deploy-nightly@v3.0.0
with:
upload_url: https://uploads.github.com/repos/jozu-ai/jmm/releases/140709733/assets{?name,label}",
release_id: 140709733
asset_path: jmm-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.archive_ext }}
asset_name: jmm-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.archive_ext }}
asset_content_type: application/zip
max_releases: 2