diff --git a/.github/workflows/deploy-wallet-get-starknet.yml b/.github/workflows/deploy-wallet-get-starknet.yml index 5e19fbee..431571e5 100644 --- a/.github/workflows/deploy-wallet-get-starknet.yml +++ b/.github/workflows/deploy-wallet-get-starknet.yml @@ -2,15 +2,10 @@ name: Deploy Wallet-UI and Get-starknet on: workflow_dispatch: - inputs: - environment: - description: 'Environment to deploy' - type: environment - required: true jobs: prepare-deployment: - environment: dev + environment: production permissions: contents: write runs-on: ubuntu-latest @@ -26,30 +21,15 @@ jobs: id: prepare_parameters run: | BASE=$(node -p "require('./packages/starknet-snap/package.json').version") - ENV=${{ inputs.environment }} + { + echo "VERSION=${BASE}" + echo "ENV=prod" echo "AWS_CLOUDFRONT_DISTRIBUTIONS_ID=${{ vars.AWS_CLOUDFRONT_DISTRIBUTIONS_ID }}" echo "AWS_S3_GET_STARKNET_URL=${{ vars.AWS_S3_GET_STARKNET_URL }}" echo "AWS_S3_URL=${{ vars.AWS_S3_URL }}" echo "GET_STARKNET_PUBLIC_PATH=${{ vars.GET_STARKNET_PUBLIC_PATH }}" } >> "$GITHUB_OUTPUT" - - if [[ $ENV == "dev" ]]; then - HASH=$(git rev-parse --short HEAD) - DATE=$(date +%Y%m%d) - { - echo "VERSION=${BASE}-dev-${HASH}-${DATE}" - echo "ENV=dev" - } >> "$GITHUB_OUTPUT" - elif [[ $ENV == "production" ]]; then - { - echo "VERSION=${BASE}" - echo "ENV=prod" - } >> "$GITHUB_OUTPUT" - else - echo "Invalid environment" - exit 1 - fi outputs: VERSION: ${{ steps.prepare_parameters.outputs.VERSION }} TAG: ${{ steps.prepare_parameters.outputs.TAG }} diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index eefe9b86..a0d80a05 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -2,15 +2,10 @@ name: Publish NPM on: workflow_dispatch: - inputs: - environment: - description: 'Environment to deploy' - type: environment - required: true jobs: prepare-deployment: - environment: dev + environment: production permissions: contents: write runs-on: ubuntu-latest @@ -26,29 +21,14 @@ jobs: id: prepare_parameters run: | BASE=$(node -p "require('./packages/starknet-snap/package.json').version") - ENV=${{ inputs.environment }} - if [[ $ENV == "dev" ]]; then - HASH=$(git rev-parse --short HEAD) - DATE=$(date +%Y%m%d) - { - echo "VERSION=${BASE}-dev-${HASH}-${DATE}" - echo "TAG=dev" - echo "ENV=dev" - echo "LOG_LEVEL=6" - } >> "$GITHUB_OUTPUT" - elif [[ $ENV == "production" ]]; then - { - echo "VERSION=${BASE}" - echo "TAG=latest" - echo "ENV=prod" - echo "LOG_LEVEL=0" - } >> "$GITHUB_OUTPUT" - else - echo "Invalid environment" - exit 1 - fi - echo $GITHUB_OUTPUT + { + echo "VERSION=${BASE}" + echo "TAG=latest" + echo "ENV=prod" + echo "LOG_LEVEL=0" + } >> "$GITHUB_OUTPUT" + outputs: VERSION: ${{ steps.prepare_parameters.outputs.VERSION }} TAG: ${{ steps.prepare_parameters.outputs.TAG }}