Skip to content

Commit

Permalink
polytone release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed May 31, 2024
1 parent ed096d9 commit cda5588
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/polytone_release.yaml
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 }}

0 comments on commit cda5588

Please sign in to comment.