Skip to content

Commit

Permalink
Switch to manually downloading the binary (#201)
Browse files Browse the repository at this point in the history
* Switch to manually downloading the binary

* Update actions

https://github.com/actions/upload-artifact?tab=readme-ov-file#v4---whats-new

* Clean up

* CHANGELOG bullet

* Use git bash on Windows to better mirror unix setup
  • Loading branch information
DavisVaughan authored Jan 27, 2025
1 parent e7ef610 commit ffe8e8b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 22 deletions.
61 changes: 39 additions & 22 deletions .github/workflows/release-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,34 @@ jobs:
with:
fetch-depth: ${{ env.FETCH_DEPTH }}

# macOS or Linux binary
- run: curl -LsSf https://github.com/posit-dev/air/releases/latest/download/air-installer.sh | sh
- name: Download air binary (macOS or Linux)
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu') }}
env:
XDG_BIN_HOME: ./bundled/bin

# Windows binary
- run: powershell -c "irm https://github.com/posit-dev/air/releases/latest/download/air-installer.ps1 | iex"
# Download, unpack, move into place, and clean up
run: |
ARCHIVE_NAME=air-${{ matrix.target }}
ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz
curl -LsSfO https://github.com/posit-dev/air/releases/latest/download/$ARCHIVE_FILE
tar -xvzf $ARCHIVE_FILE
mkdir -p bundled/bin/
mv $ARCHIVE_NAME/air bundled/bin/air
rm -R $ARCHIVE_NAME
rm -R $ARCHIVE_FILE
- name: Download air binary (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
env:
XDG_BIN_HOME: ./bundled/bin
# Download, unpack, move into place, and clean up
# Use git bash
shell: bash
run: |
ARCHIVE_NAME=air-${{ matrix.target }}
ARCHIVE_FILE=$ARCHIVE_NAME.zip
curl -LsSfO https://github.com/posit-dev/air/releases/latest/download/$ARCHIVE_FILE
unzip $ARCHIVE_FILE
mkdir -p bundled/bin/
mv air.exe bundled/bin/air.exe
rm -R $ARCHIVE_FILE
# Install Node.
- name: Install Node.js
Expand All @@ -72,7 +89,7 @@ jobs:

# Upload the extension.
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.target }}
path: ./editors/code/dist
Expand All @@ -89,27 +106,27 @@ jobs:
node-version: 22

# Download all built artifacts.
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-aarch64-apple-darwin
path: dist
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-x86_64-apple-darwin
path: dist
# - uses: actions/download-artifact@v3
# - uses: actions/download-artifact@v4
# with:
# name: dist-x86_64-unknown-linux-gnu
# path: dist
# - uses: actions/download-artifact@v3
# - uses: actions/download-artifact@v4
# with:
# name: dist-aarch64-unknown-linux-gnu
# path: dist
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-x86_64-pc-windows-msvc
path: dist
# - uses: actions/download-artifact@v3
# - uses: actions/download-artifact@v4
# with:
# name: dist-aarch64-pc-windows-msvc
# path: dist
Expand All @@ -132,27 +149,27 @@ jobs:
node-version: 22

# Download all built artifacts.
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-aarch64-apple-darwin
path: dist
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-x86_64-apple-darwin
path: dist
# - uses: actions/download-artifact@v3
# - uses: actions/download-artifact@v4
# with:
# name: dist-x86_64-unknown-linux-gnu
# path: dist
# - uses: actions/download-artifact@v3
# - uses: actions/download-artifact@v4
# with:
# name: dist-aarch64-unknown-linux-gnu
# path: dist
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-x86_64-pc-windows-msvc
path: dist
# - uses: actions/download-artifact@v3
# - uses: actions/download-artifact@v4
# with:
# name: dist-aarch64-pc-windows-msvc
# path: dist
Expand Down
2 changes: 2 additions & 0 deletions editors/code/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

## Development version

- The extension now works properly for Intel macOS (#194).

## 0.2.0

- Initial release

0 comments on commit ffe8e8b

Please sign in to comment.