Skip to content

Commit

Permalink
Add Windows for CD
Browse files Browse the repository at this point in the history
  • Loading branch information
mlech-reef committed Aug 12, 2024
1 parent 8ac9405 commit 5eb6a93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
# macos-13-xlarge instance are Apple silicon instances,
# only large and xlarge instances are available as of yet.
- { runner: macos-13-large, os: darwin, arch: arm64 }
- { runner: windows-2019, os: windows, arch: amd64 }
outputs:
version: ${{ steps.build.outputs.version }}
steps:
Expand All @@ -45,7 +46,7 @@ jobs:
python:${{ env.PYTHON_DEFAULT_VERSION }}-bullseye \
/bin/bash -c "sleep infinity"
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} (darwin)
if: matrix.conf.os == 'darwin'
if: matrix.conf.os != 'linux'
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
Expand All @@ -57,8 +58,8 @@ jobs:
echo 'command="$*"; docker exec --workdir /work/python-bindings builder /bin/bash -c "$command"' >> run
chmod +x run
sudo mv run /usr/local/bin/run
- name: Define command wrapper (darwin)
if: matrix.conf.os == 'darwin'
- name: Define command wrapper (darwin, windows)
if: matrix.conf.os != 'linux'
run: |
# MacOS wraper just runs commands in python-bindings directory
echo '#!/bin/bash' > run
Expand Down Expand Up @@ -116,6 +117,7 @@ jobs:
mv artifacts/py-terraform-provider-b2-linux-arm64/py-terraform-provider-b2 py-terraform-provider-b2-linux-arm64
mv artifacts/py-terraform-provider-b2-darwin-amd64/py-terraform-provider-b2 py-terraform-provider-b2-darwin-amd64
mv artifacts/py-terraform-provider-b2-darwin-arm64/py-terraform-provider-b2 py-terraform-provider-b2-darwin-arm64
mv artifacts/py-terraform-provider-b2-windows-amd64/py-terraform-provider-b2 py-terraform-provider-b2-windows-amd64
- name: Set release version output
id: version
run: |
Expand Down
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ builds:
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
hooks:
pre:
- cp python-bindings/dist/py-terraform-provider-b2-{{ .Os }}-{{ .Arch }} python-bindings/dist/py-terraform-provider-b2
Expand Down

0 comments on commit 5eb6a93

Please sign in to comment.