Merge pull request #344 from betwixt-labs/cs-date-fix #171
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: publish bebop | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build-compiler: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-22.04] | |
include: | |
- os: macos-latest | |
IDENTIFIER: osx | |
ARTIFACT: bebopc | |
CHORD_ARTIFACT: chordc | |
- os: windows-latest | |
IDENTIFIER: win | |
ARTIFACT: bebopc.exe | |
CHORD_ARTIFACT: chordc.exe | |
- os: ubuntu-22.04 | |
IDENTIFIER: linux | |
ARTIFACT: bebopc | |
CHORD_ARTIFACT: chordc | |
BUILD_WASI: true | |
env: | |
CONFIGURATION: Release | |
BUILD_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-x64/${{matrix.ARTIFACT}} | |
BUILD_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-arm64/${{matrix.ARTIFACT}} | |
BUILD_ZIP_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-x64.zip | |
BUILD_ZIP_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-arm64.zip | |
BUILD_ARTIFACT_WASI: ./bin/compiler/Release/artifacts/wasi-wasm/AppBundle/${{matrix.ARTIFACT}}.wasm | |
CHORD_ARTIFACT_X86_64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-x64/publish/${{matrix.CHORD_ARTIFACT}} | |
CHORD_ARTIFACT_ARM64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-arm64/publish/${{matrix.CHORD_ARTIFACT}} | |
CHORD_ZIP_ARTIFACT_X86_64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-x64/publish/chordc-${{matrix.IDENTIFIER}}-x64.zip | |
CHORD_ZIP_ARTIFACT_ARM64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-arm64/publish/chordc-${{matrix.IDENTIFIER}}-arm64.zip | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Environment Variables | |
id: dotenv | |
uses: falti/[email protected] | |
# ubuntu is the fastest OS to spin up and if one fails they all fail. | |
- if: matrix.os == 'ubuntu-22.04' | |
name: Check if Versions Synced | |
run: | | |
if [[ ! refs/tags/v${{ steps.dotenv.outputs.version }} =~ ^(${{ github.ref }})$ ]]; then | |
echo "${{ steps.dotenv.outputs.version }} is not the same as ${{ github.ref }}. Did you bump the .env file?" 1>&2 | |
exit 1 | |
fi | |
- if: matrix.os == 'ubuntu-22.04' | |
name: Install Dependencies | |
run: | | |
sudo dpkg --add-architecture arm64 | |
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse | |
EOF' | |
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list | |
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list | |
sudo apt update | |
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev zlib1g-dev:arm64 libkrb5-dev libtinfo5 | |
- if: matrix.os == 'ubuntu-22.04' && matrix.BUILD_WASI | |
name: Install WASI Dependencies | |
run: ./install-wasi.sh | |
working-directory: ./scripts/ | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "8.0.x" | |
dotnet-quality: "preview" | |
- name: Build bebopc | |
run: | | |
dotnet restore | |
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-x64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=true -p:TrimMode=partial -p:PublishSingleFile=true --self-contained | |
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-arm64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=true -p:TrimMode=partial -p:PublishSingleFile=true --self-contained | |
working-directory: ./Compiler/ | |
- if: matrix.os == 'ubuntu-22.04' && matrix.BUILD_WASI | |
name: Build bebopc for WASI | |
run: ./build-wasi.sh | |
working-directory: ./scripts/ | |
- name: Build chordc | |
run: | | |
dotnet restore | |
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-x64 | |
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-arm64 | |
working-directory: ./extensions/chordc | |
- if: matrix.os == 'macos-latest' | |
name: ZIP macOS (x64) Binary | |
run: zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ${{env.BUILD_ARTIFACT_X86_64}} | |
- if: matrix.os == 'macos-latest' | |
name: ZIP macOS (arm64) Binary | |
run: zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ${{env.BUILD_ARTIFACT_ARM64}} | |
- if: matrix.os == 'macos-latest' | |
name: Zip chordc macOS Binary | |
run: | | |
zip -j ${{env.CHORD_ZIP_ARTIFACT_X86_64}} ${{env.CHORD_ARTIFACT_X86_64}} | |
zip -j ${{env.CHORD_ZIP_ARTIFACT_ARM64}} ${{env.CHORD_ARTIFACT_ARM64}} | |
- if: matrix.os == 'ubuntu-22.04' | |
name: ZIP Linux Build | |
run: | | |
zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ${{env.BUILD_ARTIFACT_X86_64}} | |
zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ${{env.BUILD_ARTIFACT_ARM64}} | |
- if: matrix.os == 'ubuntu-22.04' | |
name: ZIP chordc Linux Build | |
run: | | |
zip -j ${{env.CHORD_ZIP_ARTIFACT_X86_64}} ${{env.CHORD_ARTIFACT_X86_64}} | |
zip -j ${{env.CHORD_ZIP_ARTIFACT_ARM64}} ${{env.CHORD_ARTIFACT_ARM64}} | |
- if: matrix.os == 'windows-latest' | |
name: ZIP Windows Build | |
shell: powershell | |
run: | | |
Compress-Archive -Path ${{env.BUILD_ARTIFACT_X86_64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_X86_64}} | |
Compress-Archive -Path ${{env.BUILD_ARTIFACT_ARM64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_ARM64}} | |
- if: matrix.os == 'windows-latest' | |
name: ZIP chordc Windows Build | |
shell: powershell | |
run: | | |
Compress-Archive -Path ${{env.CHORD_ARTIFACT_X86_64}} -DestinationPath ${{env.CHORD_ZIP_ARTIFACT_X86_64}} | |
Compress-Archive -Path ${{env.CHORD_ARTIFACT_ARM64}} -DestinationPath ${{env.CHORD_ZIP_ARTIFACT_ARM64}} | |
- name: Upload X86_64 Build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.IDENTIFIER}}-x64 | |
path: ${{env.BUILD_ZIP_ARTIFACT_X86_64}} | |
- name: Upload ARM64 Build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.IDENTIFIER}}-arm64 | |
path: ${{env.BUILD_ZIP_ARTIFACT_ARM64}} | |
- if: matrix.os == 'ubuntu-22.04' && matrix.BUILD_WASI | |
name: Upload WASI_WASM Build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wasi-wasm | |
path: ${{env.BUILD_ARTIFACT_WASI}} | |
- name: Upload chordc X86_64 Build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: chordc-${{matrix.IDENTIFIER}}-x64 | |
path: ${{env.CHORD_ZIP_ARTIFACT_X86_64}} | |
- name: Upload chordc ARM64 Build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: chordc-${{matrix.IDENTIFIER}}-arm64 | |
path: ${{env.CHORD_ZIP_ARTIFACT_ARM64}} | |
build-runtimes: | |
env: | |
NET_TEST_ROOT: ${{github.workspace}}/Laboratory/C#/Test | |
NET_RUNTIME_ROOT: ${{github.workspace}}/Runtime/C# | |
TS_TEST_ROOT: ${{github.workspace}}/Laboratory/TypeScript | |
TS_RUNTIME_ROOT: ${{github.workspace}}/Runtime/TypeScript | |
RUST_RUNTIME_ROOT: ${{github.workspace}}/Runtime/Rust | |
RUST_TEST_ROOT: ${{github.workspace}}/Laboratory/Rust | |
runs-on: ubuntu-22.04 | |
needs: build-compiler | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "20.15.0" # LTS | |
- name: Get Environment Variables | |
id: dotenv | |
uses: falti/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
dotnet-quality: 'preview' | |
- name: Test .NET Runtime | |
run: | | |
dotnet run --project ../../../Compiler/ --include $(ls -p ../../Schemas/Valid/*.bop | tr '\n' ' ') build --generator "cs:../GeneratedTestCode/Output.g.cs,namespace=Bebop.Codegen" | |
dotnet test -c Release -f net8.0 | |
working-directory: ${{env.NET_TEST_ROOT}} | |
- name: Build .NET Runtime | |
run: | | |
dotnet restore | |
dotnet build -c Release -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} | |
working-directory: ${{env.NET_RUNTIME_ROOT}} | |
- name: Upload .NET Runtime Package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bebop-runtime-cs-${{ steps.dotenv.outputs.version }} | |
path: ${{env.NET_RUNTIME_ROOT}}/bin/Release/bebop.${{ steps.dotenv.outputs.version }}.nupkg | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
- name: Cargo Login | |
run: cargo login ${{ secrets.CRATES_TOKEN }} | |
- name: Download Compiler Artifacts | |
uses: actions/download-artifact@v2 | |
- name: List Chordc Artifacts | |
continue-on-error: true | |
run: | | |
ls ./chordc-osx-x64 | |
ls ./chordc-osx-arm64 | |
ls ./chordc-linux-x64 | |
ls ./chordc-linux-arm64 | |
ls ./chordc-win-x64 | |
ls ./chordc-win-arm64 | |
- name: Extract Compiler Artifacts | |
run: | | |
mkdir -p ${{github.workspace}}/bin/compiler/Debug/artifacts | |
unzip -j -o ./linux-x64/bebopc-linux-x64.zip -d ${{github.workspace}}/bin/compiler/Debug/artifacts | |
ls | |
# todo: depend on a different job | |
- name: Test Rust Runtime | |
run: cargo test | |
working-directory: ${{ env.RUST_RUNTIME_ROOT }} | |
- name: Test Rust Labratory | |
run: | | |
cargo check -p auto-testing | |
cargo test -p functionality-testing | |
working-directory: ${{ env.RUST_TEST_ROOT }} | |
- name: Package Rust Runtime | |
working-directory: ${{ env.RUST_RUNTIME_ROOT }} | |
run: | | |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp | |
mv tmp Cargo.toml | |
cargo package --allow-dirty | |
- name: Upload Rust Runtime | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bebop-runtime-rust-${{steps.dotenv.outputs.version}} | |
path: ${{ env.RUST_RUNTIME_ROOT }}/target/package/bebop-${{ steps.dotenv.outputs.version }}.crate | |
- name: Build Typescript runtime | |
run: | | |
yarn install | |
yarn test | |
yarn build | |
working-directory: ${{env.TS_RUNTIME_ROOT}} | |
- name: Test TypeScript Runtime | |
run: | | |
yarn install | |
bash compile-schemas.sh | |
yarn test | |
working-directory: ${{env.TS_TEST_ROOT}} | |
- name: Pack TypeScript Runtime | |
run: | | |
jq '.version = "${{ steps.dotenv.outputs.version }}"' package.json > tmp && mv tmp package.json | |
yarn install | |
yarn pack | |
working-directory: ${{env.TS_RUNTIME_ROOT}} | |
- name: Upload TypeScript Runtime Package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bebop-runtime-ts-${{ steps.dotenv.outputs.version }} | |
path: ${{env.TS_RUNTIME_ROOT}}/bebop-v${{ steps.dotenv.outputs.version }}.tgz | |
build-tools: | |
env: | |
TOOLS_ROOT: ${{github.workspace}}/Tools | |
BEBOPC_PATH: ${{github.workspace}}/Tools/bebopc | |
needs: build-compiler | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "20.15.0" # LTS | |
- name: Get Environment Variables | |
id: dotenv | |
uses: falti/[email protected] | |
- name: Download Compiler Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Extract Compiler Artifacts | |
run: | | |
ls | |
unzip -j -o ./win-x64/bebopc.exe-win-x64.zip -d ${{env.BEBOPC_PATH}}/windows/x64 | |
unzip -j -o ./win-arm64/bebopc.exe-win-arm64.zip -d ${{env.BEBOPC_PATH}}/windows/arm64 | |
unzip -j -o ./osx-x64/bebopc-osx-x64.zip -d ${{env.BEBOPC_PATH}}/macos/x64 | |
unzip -j -o ./osx-arm64/bebopc-osx-arm64.zip -d ${{env.BEBOPC_PATH}}/macos/arm64 | |
unzip -j -o ./linux-x64/bebopc-linux-x64.zip -d ${{env.BEBOPC_PATH}}/linux/x64 | |
unzip -j -o ./linux-arm64/bebopc-linux-arm64.zip -d ${{env.BEBOPC_PATH}}/linux/arm64 | |
cp ./wasi-wasm/bebopc.wasm ${{env.BEBOPC_PATH}}/wasi/wasm | |
- name: Build NuGet Package | |
run: bash build.sh ${{ steps.dotenv.outputs.version }} | |
working-directory: ${{env.TOOLS_ROOT}}/vs | |
- name: Upload Nuget Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bebop-tools-nuget-${{ steps.dotenv.outputs.version }} | |
path: ${{env.TOOLS_ROOT}}/vs/packages/bebop-tools.${{ steps.dotenv.outputs.version }}.nupkg | |
- name: Package Cargo Tools | |
working-directory: ${{env.TOOLS_ROOT}}/cargo | |
run: | | |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp | |
mv tmp Cargo.toml | |
cargo package --allow-dirty | |
- name: Upload Cargo Tools | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bebop-tools-cargo-${{ steps.dotenv.outputs.version }} | |
path: ${{ env.TOOLS_ROOT }}/cargo/target/package/bebop-tools-${{ steps.dotenv.outputs.version }}.crate | |
- name: Copy Compiler Builds for NPM package | |
run: | | |
mkdir -p ${{env.TOOLS_ROOT}}/node/tools && cp -a ${{env.BEBOPC_PATH}}/. ${{env.TOOLS_ROOT}}/node/tools | |
- name: Build Tools NPM Package | |
run: | | |
jq '.version = "${{ steps.dotenv.outputs.version }}"' package.json > tmp && mv tmp package.json | |
yarn install | |
yarn pack | |
working-directory: ${{env.TOOLS_ROOT}}/node | |
- name: Upload NPM Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bebop-tools-npm-${{ steps.dotenv.outputs.version }} | |
path: ${{env.TOOLS_ROOT}}/node/bebop-tools-v${{ steps.dotenv.outputs.version }}.tgz | |
- name: Copy compiler builds for VSCode extension | |
run: | | |
mkdir -p ./vscode-bebop/compiler && cp -a ${{env.BEBOPC_PATH}}/. ./vscode-bebop/compiler | |
- name: Build VSCode extension | |
run: | | |
VERSION=$(echo ${{ steps.dotenv.outputs.version }} | sed 's/-.*//') | |
jq '.version = "'"$VERSION"'"' package.json > tmp && mv tmp package.json | |
npm install --global @vscode/vsce | |
yarn install | |
vsce package | |
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then | |
echo "Building pre-release package" | |
vsce package --pre-release | |
else | |
echo "Building standard package" | |
vsce package | |
fi | |
working-directory: ./vscode-bebop | |
- name: Upload VSCode artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vscode-bebop | |
path: vscode-bebop/bebop-lang-*.vsix | |
publish-packages: | |
env: | |
RUST_RUNTIME_ROOT: ${{github.workspace}}/Runtime/Rust | |
TOOLS_ROOT: ${{github.workspace}}/Tools | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
id-token: write | |
needs: [build-compiler, build-runtimes, build-tools] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "20.15.0" # LTS | |
registry-url: https://registry.npmjs.org/ | |
- name: Get Environment Variables | |
id: dotenv | |
uses: falti/[email protected] | |
- id: release-info | |
name: Set Release Info | |
run: | | |
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then | |
echo "PRERELEASE=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "PRERELEASE=false" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel | |
include-prerelease: true | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
- name: Cargo Login | |
run: cargo login ${{ secrets.CRATES_TOKEN }} | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Publish .NET Tools | |
run: dotnet nuget push bebop-tools-nuget-${{ steps.dotenv.outputs.version }}/bebop-tools.${{ steps.dotenv.outputs.version }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate | |
- name: Publish .NET Runtime | |
run: dotnet nuget push bebop-runtime-cs-${{ steps.dotenv.outputs.version }}/bebop.${{ steps.dotenv.outputs.version }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate | |
- name: Publish Rust Tools | |
run: | | |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp | |
mv tmp Cargo.toml | |
cargo publish --allow-dirty | |
working-directory: ${{env.TOOLS_ROOT}}/cargo | |
- name: Publish Rust Runtime | |
run: | | |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp | |
mv tmp Cargo.toml | |
cargo publish --allow-dirty | |
working-directory: ${{env.RUST_RUNTIME_ROOT}} | |
- name: Publish NodeJS Tools | |
run: npm publish "./bebop-tools-npm-${{ steps.dotenv.outputs.version }}/bebop-tools-v${{ steps.dotenv.outputs.version }}.tgz" --access public ${{ steps.release-info.outputs.PRERELEASE == 'true' && '--tag next' || '' }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
- name: Publish TypeScript Runtime (JSR) | |
continue-on-error: true | |
working-directory: ${{github.workspace}}/Runtime/TypeScript | |
run: | | |
jq '.version = "${{ steps.dotenv.outputs.version }}"' jsr.json > tmp && mv tmp jsr.json | |
npx jsr publish --allow-dirty | |
- name: Publish TypeScript Runtime (NPM) | |
run: npm publish "./bebop-runtime-ts-${{ steps.dotenv.outputs.version }}/bebop-v${{ steps.dotenv.outputs.version }}.tgz" --access public ${{ steps.release-info.outputs.PRERELEASE == 'true' && '--tag next' || '' }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
- name: Publish VSCode Extension | |
continue-on-error: true | |
run: | | |
npm install --global @vscode/vsce | |
VERSION=$(echo ${{ steps.dotenv.outputs.version }} | sed 's/-.*//') | |
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then | |
echo "Publishing vscode pre-release package" | |
vsce publish --pre-release --packagePath ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.VSCE_TOKEN }} | |
else | |
echo "Publishing vscode standard package" | |
vsce publish --packagePath ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.VSCE_TOKEN }} | |
fi | |
- name: Publish Open VSX Extension | |
continue-on-error: true | |
run: | | |
npm i -g ovsx | |
VERSION=$(echo ${{ steps.dotenv.outputs.version }} | sed 's/-.*//') | |
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then | |
echo "Publishing ovsx pre-release package" | |
npx ovsx publish --pre-release ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.OPENVSX }} | |
else | |
echo "Publishing ovsx standard package" | |
npx ovsx publish ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.OPENVSX }} | |
fi | |
- name: Move and Rename Files | |
run: | | |
mv ./win-x64/bebopc.exe-win-x64.zip ./bebopc-windows-x64.zip | |
mv ./win-arm64/bebopc.exe-win-arm64.zip ./bebopc-windows-arm64.zip | |
mv ./osx-x64/bebopc-osx-x64.zip ./bebopc-macos-x64.zip | |
mv ./osx-arm64/bebopc-osx-arm64.zip ./bebopc-macos-arm64.zip | |
mv ./linux-x64/bebopc-linux-x64.zip ./bebopc-linux-x64.zip | |
mv ./linux-arm64/bebopc-linux-arm64.zip ./bebopc-linux-arm64.zip | |
mv ./wasi-wasm/bebopc.wasm ./bebopc.wasm | |
mv ./chordc-win-x64/chordc-win-x64.zip ./chordc-windows-x64.zip | |
mv ./chordc-win-arm64/chordc-win-arm64.zip ./chordc-windows-arm64.zip | |
mv ./chordc-osx-x64/chordc-osx-x64.zip ./chordc-macos-x64.zip | |
mv ./chordc-osx-arm64/chordc-osx-arm64.zip ./chordc-macos-arm64.zip | |
mv ./chordc-linux-x64/chordc-linux-x64.zip ./chordc-linux-x64.zip | |
mv ./chordc-linux-arm64/chordc-linux-arm64.zip ./chordc-linux-arm64.zip | |
- uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.ref }} | |
name: Bebop ${{ github.ref }} | |
artifacts: "bebopc-windows-x64.zip,bebopc-windows-arm64.zip,bebopc-macos-x64.zip,bebopc-macos-arm64.zip,bebopc-linux-x64.zip,bebopc-linux-arm64.zip,bebopc.wasm,chordc-windows-x64.zip,chordc-windows-arm64.zip,chordc-macos-x64.zip,chordc-macos-arm64.zip,chordc-linux-x64.zip,chordc-linux-arm64.zip" | |
artifactContentType: "application/zip" | |
generateReleaseNotes: true | |
draft: false | |
prerelease: ${{ steps.release-info.outputs.PRERELEASE == 'true' }} |