W
Wasp4w ago
A³Learn

Deploy lower version of wasp

name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"
name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"
I thought this would be an appropriate github action but it is still calling
Run curl -sSL https://get.wasp-lang.dev/installer.sh | sh
Installing wasp version 0.16.0 (latest).
Run curl -sSL https://get.wasp-lang.dev/installer.sh | sh
Installing wasp version 0.16.0 (latest).
6 Replies
kapa.ai
kapa.ai4w ago
Hi @AAA. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, I can explain why your GitHub Action is not installing the specified Wasp version and suggest a solution. The issue you're experiencing is because the default behavior of the Wasp installer script is to install the latest version of Wasp. To install a specific version, you need to modify the installation command. According to the CLI Reference, you can install a specific version of Wasp using the following command:
curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh -s -- -v x.y.z
curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh -s -- -v x.y.z
Where x.y.z is the version number you want to install. To fix your GitHub Action, you should modify the installation step to use this command with the version specified in your WASP_VERSION environment variable. Here's how you can update your workflow:
name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Wasp
run: |
curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh -s -- -v ${{ env.WASP_VERSION }}
name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Wasp
run: |
curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh -s -- -v ${{ env.WASP_VERSION }}
This modification should ensure that the specified version (0.15.1 in your case) is installed instead of the latest version. Remember to check the GitHub Releases page to ensure the version you're trying to install is available. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @AAA, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
A³Learn
A³LearnOP4w ago
This is my full github action
name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
name: Deploy with Wasp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: wasp-lang/deploy-action@main
env:
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
REACT_APP_RECAPTCHA_SITE_KEY: ${{ secrets.REACT_APP_RECAPTCHA_SITE_KEY }}
with:
fly-token: ${{ secrets.FLY_TOKEN }}
name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
name: Deploy with Wasp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: wasp-lang/deploy-action@main
env:
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
REACT_APP_RECAPTCHA_SITE_KEY: ${{ secrets.REACT_APP_RECAPTCHA_SITE_KEY }}
with:
fly-token: ${{ secrets.FLY_TOKEN }}
@kapa.ai
kapa.ai
kapa.ai4w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Based on the GitHub Action you've provided, I can see that you're using the Wasp deploy action, which is different from manually installing Wasp using the installer script. Let me explain why your specified version isn't being used and suggest a solution. The Wasp deploy action is a pre-configured action that handles the installation and deployment of Wasp projects. By default, it uses the latest version of Wasp. To use a specific version of Wasp with this action, you need to add the wasp-version input to the action. Here's how you can modify your workflow to use the version specified in your WASP_VERSION environment variable:
name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
name: Deploy with Wasp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: wasp-lang/deploy-action@main
env:
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
REACT_APP_RECAPTCHA_SITE_KEY: ${{ secrets.REACT_APP_RECAPTCHA_SITE_KEY }}
with:
fly-token: ${{ secrets.FLY_TOKEN }}
wasp-version: ${{ env.WASP_VERSION }}
name: myapp

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
name: Deploy with Wasp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: wasp-lang/deploy-action@main
env:
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
REACT_APP_RECAPTCHA_SITE_KEY: ${{ secrets.REACT_APP_RECAPTCHA_SITE_KEY }}
with:
fly-token: ${{ secrets.FLY_TOKEN }}
wasp-version: ${{ env.WASP_VERSION }}
By adding the wasp-version: ${{ env.WASP_VERSION }} input to the wasp-lang/deploy-action, you're telling the action to use the specific version of Wasp that you've defined in your environment variables. This modification should ensure that the Wasp deploy action uses version 0.15.1 as specified in your WASP_VERSION environment variable, rather than the latest version. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @AAA, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
A³Learn
A³LearnOP4w ago
False! It was this
name: mysecretappname

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
name: Deploy with Wasp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Flyctl
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Install and Configure Wasp
shell: bash
run: |
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v ${{ env.WASP_VERSION }}
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Deploy
env:
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
REACT_APP_RECAPTCHA_SITE_KEY: ${{ secrets.REACT_APP_RECAPTCHA_SITE_KEY }}
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}
run: |
if [ -n "${{ vars.SERVER_URL }}" ]; then
REACT_APP_API_URL=${{ vars.SERVER_URL }} wasp deploy fly deploy
else
wasp deploy fly deploy
fi
shell: bash
name: mysecretappname

on:
push:
branches:
- "prod"
env:
WASP_VERSION: "0.15.1"

jobs:
deploy:
name: Deploy with Wasp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Flyctl
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Install and Configure Wasp
shell: bash
run: |
curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s -- -v ${{ env.WASP_VERSION }}
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Deploy
env:
REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
REACT_APP_RECAPTCHA_SITE_KEY: ${{ secrets.REACT_APP_RECAPTCHA_SITE_KEY }}
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}
run: |
if [ -n "${{ vars.SERVER_URL }}" ]; then
REACT_APP_API_URL=${{ vars.SERVER_URL }} wasp deploy fly deploy
else
wasp deploy fly deploy
fi
shell: bash
Vinny (@Wasp)
Vinny (@Wasp)3w ago
did you get it working @A³Learn ?
A³Learn
A³LearnOP3w ago
Yes! I should put this in the learning materials 🎁

Did you find this page helpful?