Bunch of changes, like a lot
This commit is contained in:
1 parent
f07f54d4c1
commit
3297f60f00
25 files changed
+566
-285
No files matched your search
@@ -12,15 +12,19 @@ jobs:
|
||||
version: ${{ steps.check.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check release commit and version
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check for a new stable engine version
|
||||
id: check
|
||||
env:
|
||||
COMMIT_MSG: ${{ github.event.head_commit.message }}
|
||||
BEFORE: ${{ gitea.event.before }}
|
||||
run: |
|
||||
if echo "$COMMIT_MSG" | grep -Eq 'Release [vV]?[0-9]+\.[0-9]+\.[0-9]+'; then
|
||||
version=$(echo "$COMMIT_MSG" | grep -Eo 'Release [vV]?[0-9]+\.[0-9]+\.[0-9]+' | head -n1 | sed -E 's/Release [vV]?//')
|
||||
package_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -n1)
|
||||
test "$version" = "$package_version"
|
||||
version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -n1)
|
||||
previous=""
|
||||
if [[ -n "$BEFORE" ]] && git cat-file -e "$BEFORE:Cargo.toml" 2>/dev/null; then
|
||||
previous=$(git show "$BEFORE:Cargo.toml" | sed -n 's/^version = "\([^"]*\)"/\1/p' | head -n1)
|
||||
fi
|
||||
if [[ -n "$version" && "$version" != *-dev* && "$version" != "$previous" ]]; then
|
||||
echo "match=true" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
@@ -37,15 +41,14 @@ jobs:
|
||||
with:
|
||||
targets: x86_64-unknown-linux-gnu
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test --workspace --locked
|
||||
- run: cargo build --release --workspace --locked --target x86_64-unknown-linux-gnu
|
||||
- run: cargo test --package convertis --locked
|
||||
- run: cargo build --release --package convertis --locked --target x86_64-unknown-linux-gnu
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-linux
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
target/x86_64-unknown-linux-gnu/release/convertis
|
||||
target/x86_64-unknown-linux-gnu/release/libconvertis_*.so
|
||||
target/man/convertis.1
|
||||
|
||||
package:
|
||||
@@ -123,12 +126,9 @@ jobs:
|
||||
merge-multiple: false
|
||||
- name: Prepare release assets
|
||||
run: |
|
||||
mkdir -p release-assets/plugins
|
||||
mkdir -p release-assets
|
||||
binary=$(find all-artifacts/build-linux -type f -name convertis | head -n1)
|
||||
cp "$binary" release-assets/convertis-x86_64-unknown-linux-gnu
|
||||
find all-artifacts/build-linux -type f -name 'libconvertis_*.so' -exec cp {} release-assets/plugins/ \;
|
||||
cd release-assets
|
||||
zip -r "convertis-plugins-${{ needs.check-release.outputs.version }}-x86_64-unknown-linux-gnu.zip" plugins
|
||||
- name: Generate changelog
|
||||
run: |
|
||||
last_tag=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
||||
@@ -141,7 +141,6 @@ jobs:
|
||||
body_path: changelog.md
|
||||
files: |
|
||||
release-assets/convertis-x86_64-unknown-linux-gnu
|
||||
release-assets/convertis-plugins-${{ needs.check-release.outputs.version }}-x86_64-unknown-linux-gnu.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Publish packages to Gitea registries
|
||||
|
||||
Reference in new issue
Block a user