Skip to content

Create Release(s)

Create Release(s) #6

---
name: Create Release(s)
on:
push:
branches:
- main
workflow_run:
workflows:
- "Build & Test"
types: [completed]
workflow_dispatch:
inputs:
version:
required: true
type: string
description: The version to release
jobs:
publish_dry_run:
name: Publish Dry Run
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/codde_protocol/native/
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Setup | Std
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Setup | Default to nightly
run: rustup default nightly
- name: Build | Publish Dry Run
run: cargo publish --dry-run
# TODO: Add python and dart dry run too
create_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup git
run: |
git config user.name "Mathis Lecomte"
git config user.email "vm.lecomte@gmail.com"
- uses: subosito/flutter-action@v2
- uses: bluefireteam/melos-action@v2
- name: Create the new version(s)
run: scripts/version.sh {{ inputs.version }}
- name: Push created version commit
run: git push
- name: Push modified tags
run: git push --tags