Skip to content

release

release #15

Workflow file for this run

name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout coreum-wasm-sdk
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Check Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=release::true
fi
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$ ]]; then
echo ::set-output name=release_candidate::true
fi
- name: Create release
if: steps.check-tag.outputs.release == 'true'
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
- name: Create release candidate
if: steps.check-tag.outputs.release_candidate == 'true'
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
generate_release_notes: true
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}