Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update actions to remove deprecated nodejs versions #312

Merged
merged 7 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 15 additions & 37 deletions .github/workflows/execute-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
outputs:
version: ${{ steps.release.outputs.release }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: semrel release
id: semrel
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Output release
id: release
run: echo "::set-output name=release::${{ steps.semrel.outputs.version }}"
run: echo "release=${{ steps.semrel.outputs.version }}" >> $GITHUB_OUTPUT

publish-linux-assets:
runs-on: ubuntu-latest
Expand All @@ -65,7 +65,7 @@ jobs:
- { target: aarch64-unknown-linux-gnu, rpm-arch-shortname: aarch64, deb-arch-shortname: arm64, os: ubuntu-20.04, use-cross: true }
- { target: x86_64-unknown-linux-gnu, rpm-arch-shortname: x86_64, deb-arch-shortname: amd64, os: ubuntu-20.04, use-cross: true }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install protoc
run: ./scripts/install_protoc_linux.sh
Expand All @@ -77,14 +77,6 @@ jobs:
aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
esac

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.architecture.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)

- name: Show version information (Rust, cargo, GCC)
shell: bash
run: |
Expand Down Expand Up @@ -193,19 +185,11 @@ jobs:
- { target: aarch64-apple-darwin, use-cross: true }

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install protoc
run: ./scripts/install_protoc_osx.sh

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.architecture.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)

- name: Show version information (Rust, cargo, GCC)
shell: bash
run: |
Expand Down Expand Up @@ -253,7 +237,7 @@ jobs:
outputs:
msi_filename: ${{ steps.build_installer.outputs.asset_name }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install protoc
run: choco install protoc
Expand All @@ -263,12 +247,6 @@ jobs:
with:
python-version: "3.x"

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true

- name: Show Cargo Version
run: |
cat Cargo.toml
Expand All @@ -282,9 +260,9 @@ jobs:
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu

echo "::set-output name=momento_binary_path::.\target\x86_64-pc-windows-gnu\release\momento.exe"
echo "momento_binary_path=.\target\x86_64-pc-windows-gnu\release\momento.exe" >> $GITHUB_OUTPUT
$distributableFile64Prefix = "momento-cli-$env:VERSION.windows_x64"
echo "::set-output name=distributable_file_prefix::$distributableFile64Prefix"
echo "distributable_file_prefix=$distributableFile64Prefix" >> $GITHUB_OUTPUT

- name: Write client auth certificate file
id: write_client_auth_cert
Expand Down Expand Up @@ -365,8 +343,8 @@ jobs:
$zipPath = ".\$zipFilename"
Compress-Archive -LiteralPath $env:MOMENTO_BINARY_PATH -DestinationPath $zipPath

echo "::set-output name=asset_path::$zipPath"
echo "::set-output name=asset_name::$zipFilename"
echo "asset_path=$zipPath" >> $GITHUB_OUTPUT
echo "asset_name=$zipFilename" >> $GITHUB_OUTPUT

- name: Add msbuild to PATH
uses: microsoft/[email protected]
Expand All @@ -384,8 +362,8 @@ jobs:

$msiFilename = "$env:DISTRIBUTABLE_FILE_PREFIX.msi"
$msiPath = ".\windows\installer\bin\Release\$msiFilename"
echo "::set-output name=asset_path::$msiPath"
echo "::set-output name=asset_name::$msiFilename"
echo "asset_path=$msiPath" >> $GITHUB_OUTPUT
echo "asset_name=$msiFilename" >> $GITHUB_OUTPUT

- name: Sign installer
env:
Expand Down Expand Up @@ -415,8 +393,8 @@ jobs:
$releaseId = $latestRelease | jq -r .id
$ghAssetMsi = "https://uploads.github.com/repos/momentohq/momento-cli/releases/$releaseId/assets?name=$env:MSI_FILENAME"
$ghAssetZip = "https://uploads.github.com/repos/momentohq/momento-cli/releases/$releaseId/assets?name=$env:ZIP_FILENAME"
echo "::set-output name=upload_url_msi::$ghAssetMsi"
echo "::set-output name=upload_url_zip::$ghAssetZip"
echo "upload_url_msi=$ghAssetMsi" >> $GITHUB_OUTPUT
echo "upload_url_zip=$ghAssetZip" >> $GITHUB_OUTPUT

- name: Upload windows_x64 msi
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -492,7 +470,7 @@ jobs:
MSI_FILENAME: ${{ needs.publish-windows-assets.outputs.msi_filename }}
run: |
$installerUrl = "https://github.com/momentohq/momento-cli/releases/download/v$env:VERSION/$env:MSI_FILENAME"
echo "::set-output name=installer_url::$installerUrl"
echo "installer_url=$installerUrl" >> $GITHUB_OUTPUT

- name: Open PR on WinGet
env:
Expand All @@ -507,7 +485,7 @@ jobs:

steps:
- name: Check out homebrew-tap
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: momentohq/homebrew-tap
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Style & Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install protoc
run: ./scripts/install_protoc_linux.sh
Expand All @@ -31,17 +31,11 @@ jobs:
max-parallel: 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install protoc
run: ./scripts/install_protoc_linux.sh

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true

- uses: Swatinem/rust-cache@v2

- name: Build
Expand All @@ -53,15 +47,10 @@ jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install protoc
run: choco install protoc

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Build
run: cargo build --verbose
16 changes: 3 additions & 13 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Style & Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install protoc
run: ./scripts/install_protoc_linux.sh
Expand All @@ -29,16 +29,11 @@ jobs:
max-parallel: 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install protoc
run: ./scripts/install_protoc_linux.sh

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Build
run: cargo build --verbose

Expand All @@ -48,16 +43,11 @@ jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install protoc
run: choco install protoc

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Build
run: cargo build --verbose

Expand Down