-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed096d9
commit cda5588
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Builds and commits the artifacts whenever a polytone release is made. | ||
name: polytone artifact compiler | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- "cosmwasm/polytone/v*" | ||
|
||
env: | ||
WORKING_DIRECTORY: cosmwasm/polytone | ||
|
||
jobs: | ||
release-artifacts: | ||
runs-on: ubuntu-latest | ||
container: cosmwasm/workspace-optimizer:0.15.1 | ||
defaults: | ||
run: | ||
working-directory: ${{ env.WORKING_DIRECTORY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# tar is required for cargo cache | ||
- run: apk add --no-cache tar | ||
|
||
- name: Set up cargo cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Compile contracts | ||
timeout-minutes: 30 | ||
run: optimize.sh . | ||
|
||
- name: Upload contracts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: contracts | ||
path: ${{ env.WORKING_DIRECTORY }}/artifacts/* | ||
|
||
- name: release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: ${{ env.WORKING_DIRECTORY }}/artifacts/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |