build: bump selium-server to 0.5.0 #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
release: | |
name: Create GitHub Release | |
strategy: | |
max-parallel: 1 | |
matrix: | |
name: [log, standard, protocol, client, server, tools] | |
include: | |
- name: log | |
display: Log | |
repo: selium-log | |
- name: standard | |
display: Standard | |
repo: selium-std | |
- name: protocol | |
display: protocol | |
repo: selium-protocol | |
- name: client | |
display: Client | |
repo: selium | |
- name: server | |
display: Server | |
repo: selium-server | |
- name: tools | |
display: Tools | |
repo: selium-tools | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get latest tag | |
id: latesttag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
with: | |
fallback: ${{ matrix.name }}-0.0.0 | |
prefix: ${{ matrix.name }}- | |
- name: Get crate version | |
id: version | |
run: echo value=$(sed -ne 's/^version = "\(.*\)"/\1/p' < ${{ matrix.name }}/Cargo.toml) >> $GITHUB_OUTPUT | |
- name: Get CHANGELOG entry | |
id: changelog | |
run: | | |
body=$(python ci/changelog.py ${{ matrix.name }} ${{ steps.version.outputs.value }}) | |
echo body=${body//$'\n'/'%0A'} >> $GITHUB_OUTPUT | |
if: ${{ steps.latesttag.outputs.tag != format('{0}-{1}', matrix.name, steps.version.outputs.value) }} | |
- name: Tag branch | |
uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: ${{ format('{0}-{1}', matrix.name, steps.version.outputs.value) }} | |
message: ${{ format('{0}-{1}', matrix.name, steps.version.outputs.value) }} | |
if: ${{ steps.latesttag.outputs.tag != format('{0}-{1}', matrix.name, steps.version.outputs.value) }} | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} | |
with: | |
tag_name: ${{ format('{0}-{1}', matrix.name, steps.version.outputs.value) }} | |
name: ${{ matrix.display }} Release ${{ steps.version.outputs.value }} | |
body: ${{ steps.changelog.outputs.body }} | |
draft: false | |
prerelease: false | |
if: ${{ steps.latesttag.outputs.tag != format('{0}-{1}', matrix.name, steps.version.outputs.value) }} | |
- name: Login to Crates.io | |
uses: actions-rs/cargo@v1 | |
with: | |
command: login | |
args: ${{ secrets.CRATES_TOKEN }} | |
if: ${{ steps.latesttag.outputs.tag != format('{0}-{1}', matrix.name, steps.version.outputs.value) }} | |
- name: Cargo publish | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: -p ${{ matrix.repo }} | |
if: ${{ steps.latesttag.outputs.tag != format('{0}-{1}', matrix.name, steps.version.outputs.value) }} |