Skip to content

Commit

Permalink
Deploy binaries (#274)
Browse files Browse the repository at this point in the history
Closes #261
  • Loading branch information
andrzejressel authored Jul 23, 2024
1 parent 20aa408 commit c6cc48c
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 1 deletion.
84 changes: 83 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,86 @@ jobs:
prerelease: true
body: ""
files: |
pulumi-language-wasm/*.tar.gz
pulumi-language-wasm/*.tar.gz
deploy_runner:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- rust-target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- rust-target: x86_64-apple-darwin
os: macos-latest
- rust-target: aarch64-apple-darwin
os: macos-latest
- rust-target: x86_64-pc-windows-msvc
os: windows-latest

steps:
- run: git config --system core.longpaths true
if: runner.os == 'Windows'
- name: Write release version (non-Windows)
if: matrix.os != 'windows-latest'
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Write release version (Windows)
if: matrix.os == 'windows-latest'
run: |
$VERSION = $env:GITHUB_REF_NAME -replace "^v"
echo "Version: $VERSION"
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: true
- uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: cargo-bins/cargo-binstall@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install requirements
run: just install-requirements
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "25.3"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: protoc --version

- uses: Swatinem/rust-cache@v2
with:
shared-key: build
save-if: false
workspaces: |
./
pulumi_wasm_generator_lib/tests/output/pulumi_providers/command/
pulumi_wasm_generator_lib/tests/output/pulumi_providers/docker/
pulumi_wasm_generator_lib/tests/output/pulumi_providers/random/
pulumi_wasm_generator_lib/tests/output/pulumi_tests/cyclic-types/
pulumi_wasm_generator_lib/tests/output/pulumi_tests/mini-awsnative/
- name: Add target
run: rustup target add ${{ matrix.rust-target }}
- name: Build runner
run: cargo build -p pulumi_wasm_runner --target ${{ matrix.rust-target }}

- run: mv ./target/${{ matrix.rust-target }}/debug/pulumi_wasm_runner.exe ./target/${{ matrix.rust-target }}/debug/pulumi_wasm_runner-${{ matrix.rust-target }}
if: matrix.os == 'windows-latest'
- run: mv ./target/${{ matrix.rust-target }}/debug/pulumi_wasm_runner ./target/${{ matrix.rust-target }}/debug/pulumi_wasm_runner-${{ matrix.rust-target }}
if: matrix.os != 'windows-latest'

- name: Release
uses: softprops/[email protected]
with:
name: ${{ env.VERSION }}
tag_name: ${{ env.GITHUB_REF_NAME }}
fail_on_unmatched_files: true
prerelease: true
body: ""
files: |
./target/${{ matrix.rust-target }}/debug/pulumi_wasm_runner-${{ matrix.rust-target }}
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "pulumi-wasm-parent"
version.workspace = true
edition.workspace = true
repository.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down Expand Up @@ -33,6 +34,7 @@ members = [
[workspace.package]
version = "0.0.0-DEV"
edition = "2021"
repository = "https://github.com/andrzejressel/pulumi-wasm"

[workspace.dependencies]
pulumi_wasm_core = { version = "=0.0.0-DEV", path = "pulumi_wasm_core", registry = "cloudsmith" }
Expand Down
1 change: 1 addition & 0 deletions pulumi_wasm_runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "pulumi_wasm_runner"
version.workspace = true
edition.workspace = true
repository.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
Empty file removed test
Empty file.

0 comments on commit c6cc48c

Please sign in to comment.