Skip to content

docs: add the description of versioning rule (#330) #46

docs: add the description of versioning rule (#330)

docs: add the description of versioning rule (#330) #46

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
container: cibuilds/github:0.13
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install libgcc
run: apk add libgcc
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Get version
id: get_version
run: |
VERSION=$(./devtools/get_version.sh)
echo ::set-output name=version::v$VERSION
- name: Get latest tag
id: get_latest_tag
uses: actions-ecosystem/action-get-latest-tag@v1
- name: Create new tag
if: ${{ steps.get_version.outputs.version != steps.get_latest_tag.outputs.tag }}
run: |
git tag ${{ steps.get_version.outputs.version }}
- name: Install Docker client
if: ${{ steps.get_version.outputs.version != steps.get_latest_tag.outputs.tag }}
run: |
apk add docker-cli
- name: Prepare volume with source code
if: ${{ steps.get_version.outputs.version != steps.get_latest_tag.outputs.tag }}
run: |
# create a dummy container which will hold a volume with config
docker create -v /code --name with_code alpine /bin/true
# copy a config file into this volume
docker cp ./Cargo.toml with_code:/code
docker cp ./Cargo.lock with_code:/code
docker cp ./contracts with_code:/code
docker cp ./packages with_code:/code
- name: Build development contracts
if: ${{ steps.get_version.outputs.version != steps.get_latest_tag.outputs.tag }}
run: |
echo "Building all contracts under ./contracts"
docker run --volumes-from with_code cosmwasm/rust-optimizer:0.12.9 ./contracts/*/
- name: Check development contracts
if: ${{ steps.get_version.outputs.version != steps.get_latest_tag.outputs.tag }}
working-directory: ./
run: |
echo "Checking all contracts under ./artifacts"
docker run --volumes-from with_code rust:1.60.0 /bin/bash -e -c 'cd ./code/packages/check; export GLOBIGNORE=../../artifacts/floaty.wasm; cargo run ../../artifacts/*.wasm'
docker cp with_code:/code/artifacts .
- name: Create Release
if: ${{ steps.get_version.outputs.version != steps.get_latest_tag.outputs.tag }}
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.version }}
body: ${{ github.event.pull_request.body }}
files: |
./artifacts/*
draft: false
prerelease: false