Prepare 1.3.0 release #128
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 ceramic | |
on: | |
push: | |
tags: | |
- v** | |
jobs: | |
setup-release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Save upload URL | |
working-directory: . | |
run: | | |
echo '${{ steps.create_release.outputs.upload_url }}' > upload_url.txt | |
- name: Upload saved file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: upload_url | |
path: upload_url.txt | |
retention-days: 1 | |
build-ceramic-windows: | |
needs: setup-release | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.19.1' | |
- name: Setup NPM | |
working-directory: . | |
run: | | |
npm install -g [email protected] | |
- name: Setup Haxe | |
working-directory: . | |
run: | | |
$NEKOPATH = $(Convert-Path .)+'/git/haxe-binary/windows/neko' | |
$HAXEPATH = $(Convert-Path .)+'/git/haxe-binary/windows/haxe' | |
echo $NEKOPATH >> $GITHUB_PATH | |
echo $HAXEPATH >> $GITHUB_PATH | |
echo $NEKOPATH | |
echo $HAXEPATH | |
- name: Build ceramic | |
working-directory: ./node | |
run: | | |
npm ci | |
cd ../tools | |
./npm ci | |
./node post-install.js | |
cd ../runner | |
../tools/npm ci | |
cd .. | |
- name: Cleanup | |
working-directory: . | |
run: | | |
Remove-Item 'git/haxe-binary/linux' -Recurse | |
Remove-Item 'git/haxe-binary/mac' -Recurse | |
cd tools | |
Remove-Item './npm' | |
Remove-Item './npx' | |
Remove-Item './node' | |
Remove-Item './haxe' | |
Remove-Item './haxelib' | |
Remove-Item './neko' | |
Remove-Item './ceramic' | |
cd .. | |
- name: Run ceramic | |
working-directory: ./tools | |
run: | | |
./ceramic | |
- name: Check ceramic version | |
working-directory: ./tools | |
run: | | |
$GIT_TAG = $($env:GITHUB_REF).replace("refs/tags/", "") | |
./ceramic version --check-tag $GIT_TAG | |
- name: Create zip archive | |
working-directory: . | |
run: | | |
$ZIP_COMPRESS = $(Convert-Path .) | |
$ZIP_EXCLUDE = @(".git", ".github", "ceramic-windows.zip") | |
$ZIP_DESTINATION = 'ceramic-windows.zip' | |
$ZIP_FILES = Get-ChildItem -Path $ZIP_COMPRESS -Exclude $ZIP_EXCLUDE | |
Compress-Archive -Path $ZIP_FILES -DestinationPath $ZIP_DESTINATION -CompressionLevel Optimal | |
- name: Retrieve upload URL | |
uses: actions/download-artifact@v2 | |
with: | |
name: upload_url | |
- name: Pass upload URL | |
working-directory: . | |
id: release_url | |
run: | | |
$UPLOAD_URL = $(cat upload_url.txt) | |
echo "UPLOAD_URL=$UPLOAD_URL" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | |
- name: Upload release asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release_url.outputs.UPLOAD_URL }} | |
asset_path: ./ceramic-windows.zip | |
asset_name: ceramic-windows.zip | |
asset_content_type: application/zip | |
build-ceramic-mac: | |
needs: setup-release | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.19.1' | |
- name: Setup NPM | |
working-directory: . | |
run: | | |
sudo npm install -g [email protected] | |
- name: Setup Haxe | |
working-directory: . | |
run: | | |
set -ex | |
export NEKOPATH=$PWD'/git/haxe-binary/mac/neko' | |
export HAXEPATH=$PWD'/git/haxe-binary/mac/haxe' | |
echo 'neko path: '$NEKOPATH | |
echo 'haxe path: '$HAXEPATH | |
sudo mkdir -p /usr/local/bin | |
sudo mkdir -p /usr/local/lib | |
sudo mkdir -p /usr/local/share/haxe | |
sudo ln -s $HAXEPATH/haxe /usr/local/bin/haxe | |
sudo ln -s $HAXEPATH/haxelib /usr/local/bin/haxelib | |
sudo ln -s $HAXEPATH/haxe-bin /usr/local/bin/haxe-bin | |
sudo ln -s $HAXEPATH/haxelib-bin /usr/local/bin/haxelib-bin | |
sudo ln -s $HAXEPATH/std /usr/local/share/haxe/std | |
sudo ln -s $NEKOPATH/neko /usr/local/bin/neko | |
sudo ln -s $NEKOPATH/nekoc /usr/local/bin/nekoc | |
sudo ln -s $NEKOPATH/nekoml /usr/local/bin/nekoml | |
sudo ln -s $NEKOPATH/nekotools /usr/local/bin/nekotools | |
sudo ln -s $NEKOPATH /usr/local/lib/neko | |
sudo ln -s $NEKOPATH/libneko.dylib /usr/local/lib/libneko.dylib | |
sudo ln -s $NEKOPATH/libneko.2.3.0.dylib /usr/local/lib/libneko.2.3.0.dylib | |
sudo ln -s $NEKOPATH/libneko.2.dylib /usr/local/lib/libneko.2.dylib | |
set +x | |
echo 'neko: '$(neko -version) | |
echo 'haxe: '$(haxe --version) | |
- name: Build ceramic | |
working-directory: ./node | |
run: | | |
npm ci | |
cd ../tools | |
./npm ci | |
./node post-install.js | |
cd ../runner | |
../tools/npm ci | |
cd .. | |
- name: Cleanup | |
working-directory: . | |
run: | | |
rm -rf git/haxe-binary/linux | |
rm -rf git/haxe-binary/windows | |
cd tools | |
rm -f ./npm.cmd | |
rm -f ./npx.cmd | |
rm -f ./node.cmd | |
rm -f ./haxe.cmd | |
rm -f ./neko.cmd | |
rm -f ./ceramic.cmd | |
cd .. | |
- name: Run ceramic | |
working-directory: ./tools | |
run: | | |
./ceramic | |
- name: Check ceramic version | |
working-directory: ./tools | |
run: | | |
GIT_TAG=${GITHUB_REF/refs\/tags\//} | |
./ceramic version --check-tag $GIT_TAG | |
- name: Create zip archive | |
run: zip --symlinks -9 -r 'ceramic-mac.zip' . -x ".git/*" ".github/*" | |
- name: Retrieve upload URL | |
uses: actions/download-artifact@v2 | |
with: | |
name: upload_url | |
- name: Pass upload URL | |
working-directory: . | |
id: release_url | |
run: | | |
echo 'UPLOAD_URL='$(cat upload_url.txt) >> $GITHUB_OUTPUT | |
- name: Upload release asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release_url.outputs.UPLOAD_URL }} | |
asset_path: ./ceramic-mac.zip | |
asset_name: ceramic-mac.zip | |
asset_content_type: application/zip | |
build-ceramic-linux: | |
needs: setup-release | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.19.1' | |
- name: Setup NPM | |
working-directory: . | |
run: | | |
sudo npm install -g [email protected] | |
- name: Setup Haxe | |
working-directory: . | |
run: | | |
export NEKOPATH=$PWD'/git/haxe-binary/linux/neko' | |
export HAXEPATH=$PWD'/git/haxe-binary/linux/haxe' | |
echo 'neko path: '$NEKOPATH | |
echo 'haxe path: '$HAXEPATH | |
sudo mkdir -p /usr/local/bin | |
sudo mkdir -p /usr/local/lib | |
sudo mkdir -p /usr/local/share/haxe | |
sudo ln -s $HAXEPATH/haxe /usr/local/bin/haxe | |
sudo ln -s $HAXEPATH/haxelib /usr/local/bin/haxelib | |
sudo ln -s $HAXEPATH/haxe-bin /usr/local/bin/haxe-bin | |
sudo ln -s $HAXEPATH/haxelib-bin /usr/local/bin/haxelib-bin | |
sudo ln -s $HAXEPATH/std /usr/local/share/haxe/std | |
sudo ln -s $NEKOPATH/neko /usr/local/bin/neko | |
sudo ln -s $NEKOPATH/nekoc /usr/local/bin/nekoc | |
sudo ln -s $NEKOPATH/nekoml /usr/local/bin/nekoml | |
sudo ln -s $NEKOPATH/nekotools /usr/local/bin/nekotools | |
sudo ln -s $NEKOPATH /usr/local/lib/neko | |
sudo ln -s $NEKOPATH/libneko.so /usr/local/lib/libneko.so | |
sudo ln -s $NEKOPATH/libneko.so.2.3.0 /usr/local/lib/libneko.so.2.3.0 | |
sudo ln -s $NEKOPATH/libneko.so.2 /usr/local/lib/libneko.so.2 | |
sudo ldconfig | |
sudo ldconfig /usr/local/lib | |
echo 'neko: '$(neko -version) | |
echo 'haxe: '$(haxe --version) | |
- name: Build ceramic | |
working-directory: ./node | |
run: | | |
npm ci | |
cd ../tools | |
./npm ci | |
./node post-install.js | |
cd ../runner | |
../tools/npm ci | |
cd .. | |
- name: Cleanup | |
working-directory: . | |
run: | | |
rm -rf git/haxe-binary/mac | |
rm -rf git/haxe-binary/windows | |
cd tools | |
rm -f ./npm.cmd | |
rm -f ./npx.cmd | |
rm -f ./node.cmd | |
rm -f ./haxe.cmd | |
rm -f ./neko.cmd | |
rm -f ./ceramic.cmd | |
cd .. | |
- name: Run ceramic | |
working-directory: ./tools | |
run: | | |
./ceramic | |
- name: Check ceramic version | |
working-directory: ./tools | |
run: | | |
GIT_TAG=${GITHUB_REF/refs\/tags\//} | |
./ceramic version --check-tag $GIT_TAG | |
- name: Create zip archive | |
run: zip --symlinks -9 -r 'ceramic-linux.zip' . -x ".git/*" ".github/*" | |
- name: Retrieve upload URL | |
uses: actions/download-artifact@v2 | |
with: | |
name: upload_url | |
- name: Pass upload URL | |
working-directory: . | |
id: release_url | |
run: | | |
echo 'UPLOAD_URL='$(cat upload_url.txt) >> $GITHUB_OUTPUT | |
- name: Upload release asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release_url.outputs.UPLOAD_URL }} | |
asset_path: ./ceramic-linux.zip | |
asset_name: ceramic-linux.zip | |
asset_content_type: application/zip | |
generate-api-docs: | |
needs: [build-ceramic-windows, build-ceramic-mac, build-ceramic-linux] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Dispatch event | |
uses: ceramic-engine/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.PAT_PUBLIC }} | |
repository: ceramic-engine/api-docs | |
event-type: deploy-api-docs | |
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' |