Skip to content

chore: update pali to deploy main version #30

chore: update pali to deploy main version

chore: update pali to deploy main version #30

Workflow file for this run

name: Release
on:
push:
branches:
- pre-release
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: yarn install
- name: Set TARGET_BROWSER environment variable
run: echo "TARGET_BROWSER=chrome" >> $GITHUB_ENV
- name: Build project for Chrome
run: yarn run build:chrome
- name: Build project for Canary
run: yarn run build:canary
- name: List files in build directory
run: ls -l ./build
- name: Set asset name for Chrome
id: set_asset_name_chrome
run: echo "ASSET_NAME_CHROME=$(ls build | grep 'pali-wallet-' | grep 'chrome' | grep '.zip' | grep -v 'canary')" >> $GITHUB_ENV
- name: Set asset name for Canary
id: set_asset_name_canary
run: echo "ASSET_NAME_CANARY=$(ls build | grep 'pali-wallet-' | grep 'chrome' | grep 'canary' | grep '.zip')" >> $GITHUB_ENV
- name: Get package version
id: get_version
run: echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
- name: Create a draft release
id: create_release
uses: actions/create-release@v1
with:
tag_name: v${{ github.event.repository.name }}-${{ github.ref_name }}-release
release_name: Release ${{ github.event.repository.name }} for ${{ github.ref_name }} (v${{ env.PACKAGE_VERSION }})
draft: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Chrome zip to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/${{ env.ASSET_NAME_CHROME }}
asset_name: ${{ env.ASSET_NAME_CHROME }}
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Canary zip to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/${{ env.ASSET_NAME_CANARY }}
asset_name: ${{ env.ASSET_NAME_CANARY }}
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}