Skip to content

Commit

Permalink
Merge pull request #16 from perpetual-protocol/build/abi-type
Browse files Browse the repository at this point in the history
build: use env to assign abi env
  • Loading branch information
JustinlinPerp authored Mar 15, 2022
2 parents 3ef1cfc + b9c2b07 commit 56d90ae
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: set-variables
run: |
echo "::set-output name=pkg_version::${{ steps.version.outputs.value }}"
echo "::set-output name=release_env::dev1"
# See: https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get Yarn cache directory
id: yarn-cache-dir-path
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dev2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ jobs:
# See: https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: |
echo "::set-output name=dir::$(yarn cache dir)"
echo "::set-output name=release_env::dev2"
- name: Use Yarn cache
uses: actions/cache@v2
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ jobs:
echo "::set-output name=pkg_version::${{ steps.version.outputs.value }}"
if [[ ${{ github.event.release.tag_name }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] \
&& [[ ${{ github.event.release.target_commitish }} =~ ^release\/[0-9]+\.[0-9]+\.[0-9x]+$ ]]
then
echo "::set-output name=release_env::production"
&& [[ ${{ github.event.release.target_commitish }} =~ ^release\/[0-9]+\.[0-9]+\.[0-9x]+$ ]]
then
echo "::set-output name=release_env::production"
elif [[ ${{ github.event.release.tag_name }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+-alpha$ ]] \
&& [[ ${{ github.event.release.target_commitish }} =~ ^release\/[0-9]+\.[0-9]+\.[0-9x]+$ ]]
then
echo "::set-output name=release_env::staging"
else
echo "Your tag and branch are not matched."
exit 1
Expand Down

0 comments on commit 56d90ae

Please sign in to comment.