Skip to content

Commit

Permalink
test release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmarc committed Apr 25, 2024
1 parent 8eacbd8 commit 6c2468f
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[changelog]
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }} \
({{ commit.id }})\
{% endfor %}
{% endfor %}\n
"""

[git]
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->New Features" },
{ message = "^fix", group = "<!-- 1 -->Bugfixes" },
{ message = "^doc", skip = true },
{ message = "^perf", skip = true },
{ message = "^refactor", skip = true },
{ message = "^style", skip = true },
{ message = "^test", skip = true },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", skip = true },
{ body = ".*security", skip = true },
{ message = "^revert", skip = true },
]
49 changes: 49 additions & 0 deletions .github/workflows/release-mmserver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
tags:
- 'mmserver-test-ci-release'

jobs:
create_release:
name: Create mmserver release
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu

- uses: actions/checkout@v2
- uses: swatinem/rust-cache@v2
with:
workspaces: |
mm-server
mm-client
mm-protocol
- name: install deps
run: sudo apt install nasm cmake

- name: cargo build
run: (cd mm-server && cargo build --bin mmserver --release --target x86_64-unknown-linux-gnu)
- run: |-
mkdir "${RUNNER_TMP}/${GITHUB_REF_NAME}"
cp -r mm-server/target/release/mmserver README.md "${RUNNER_TMP}/${GITHUB_REF_NAME}"
cp LICENSES/BUSL-1.1.txt "${RUNNER_TMP}/${GITHUB_REF_NAME}/LICENSE.txt"
tar -C "${RUNNER_TMP}" --numeric-owner -cvzf "${GITHUB_REF_NAME}-linux-amd64.tar.gz" "$GITHUB_REF_NAME"
- run: cargo install git-cliff
- name: generate release notes
run: |-
echo "Server version ${GITHUB_REF_NAME/mmserver-v//}" >> release-notes.txt
git cliff -c .github/workflows/cliff.toml --include-path "mm-server/**/*" | tail -n +2 >> release-notes.txt
- name: create release
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.txt
files: "mmserver-*.tar.gz"
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}



0 comments on commit 6c2468f

Please sign in to comment.