Skip to content

Commit

Permalink
Install pesde before trying to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
vocksel committed Nov 23, 2024
1 parent e784d1c commit e50d6c1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/actions/setup-pesde/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# upstream: https://github.com/0x5eal/semver-luau/blob/main/.github/actions/setup-pesde/action.yml

name: Install pesde
description: Installs pesde CLI and authenticates with the registry

inputs:
pesde-token:
description: "Token for publishing to the pesde registry"
required: false

runs:
using: composite
steps:
- name: Download pesde
shell: bash
run: |
latest_release=$(curl -s https://api.github.com/repos/daimond113/pesde/releases | jq '[.[] | select(.prerelease == true or .prerelease == false)][0]')
download_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith("linux-x86_64.tar.gz")) | .browser_download_url')
curl -L -o /tmp/pesde.tar.gz "$download_url"
tar -xzvf /tmp/pesde.tar.gz
chmod +x pesde
./pesde self-install
rm ./pesde
echo "$HOME/.pesde/bin" >> $GITHUB_PATH
- name: Authenticate into pesde registry
if: inputs.pesde-token != ''
shell: bash
run: pesde auth login --token "${{ inputs.pesde-token }}"
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install pesde
uses: ./.github/actions/setup-pesde

- name: Install packages
run: pesde install --prod

Expand Down Expand Up @@ -45,6 +48,9 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install pesde
uses: ./.github/actions/setup-pesde

- name: Setup Lune typedefs
run: lune setup

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install pesde
uses: ./.github/actions/setup-pesde

- name: Get model file name
run: |
name=$(jq -r .name default.project.json)
Expand Down Expand Up @@ -47,6 +50,9 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install pesde
uses: ./.github/actions/setup-pesde

- name: Install packages
run: pesde install --prod

Expand All @@ -65,6 +71,9 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install pesde
uses: ./.github/actions/setup-pesde

- name: Install packages
run: pesde install

Expand Down

0 comments on commit e50d6c1

Please sign in to comment.