Skip to content

Commit

Permalink
fixed artifact release github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed May 28, 2024
1 parent 6148f8b commit 04375f3
Showing 1 changed file with 32 additions and 15 deletions.
47 changes: 32 additions & 15 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,38 @@ on:
jobs:
release-artifacts:
runs-on: ubuntu-latest
container: cosmwasm/workspace-optimizer:0.15.1
steps:
- uses: actions/checkout@v3
- name: Install latest stable
uses: ATiltedTree/setup-rust@v1

# 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_workspace.sh .

- name: Upload contracts
uses: actions/upload-artifact@v3
with:
name: contracts
path: artifacts/

- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
rust-version: stable
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Artifacts
run: |
./devtools/optimize.sh
- name: Commit artifacts
run: |
git config --global user.name 'DA0-DA0'
git config --global user.email '[email protected]'
git add artifacts --force
git commit -m "Update artifacts [skip ci]"
git push
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 04375f3

Please sign in to comment.