Merge pull request 'Feature/gitea actions' (#4) from feature/gitea-actions into dev
Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
@@ -19,9 +19,12 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: Install Packaging Tools
|
- name: Install Packaging Tools (Prebuilt Binaries)
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-deb cargo-generate-rpm --locked
|
mkdir -p ~/.cargo/bin
|
||||||
|
curl -fsSL https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -xz -C ~/.cargo/bin
|
||||||
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
~/.cargo/bin/cargo-binstall -y --no-symlinks cargo-deb cargo-generate-rpm
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
@@ -48,13 +51,14 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||||
REPO_OWNER: ${{ gitea.repository_owner || github.repository_owner }}
|
REPO_OWNER: ${{ gitea.repository_owner || github.repository_owner }}
|
||||||
TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
ACTOR: ${{ gitea.actor || github.actor }}
|
||||||
|
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||||
run: |
|
run: |
|
||||||
echo "Veröffentliche Debian-Paket (Distribution: testing, Component: main)..."
|
echo "Veröffentliche Debian-Paket (Distribution: testing, Component: main)..."
|
||||||
for deb in target/debian/*.deb; do
|
for deb in target/debian/*.deb; do
|
||||||
[ -f "$deb" ] || continue
|
[ -f "$deb" ] || continue
|
||||||
curl -f -s -S -X PUT \
|
curl -f -s -S -X PUT \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
--user "${ACTOR}:${TOKEN}" \
|
||||||
--upload-file "$deb" \
|
--upload-file "$deb" \
|
||||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/testing/main/upload"
|
"${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/testing/main/upload"
|
||||||
done
|
done
|
||||||
@@ -63,7 +67,7 @@ jobs:
|
|||||||
for rpm in target/generate-rpm/*.rpm; do
|
for rpm in target/generate-rpm/*.rpm; do
|
||||||
[ -f "$rpm" ] || continue
|
[ -f "$rpm" ] || continue
|
||||||
curl -f -s -S -X PUT \
|
curl -f -s -S -X PUT \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
--user "${ACTOR}:${TOKEN}" \
|
||||||
--upload-file "$rpm" \
|
--upload-file "$rpm" \
|
||||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/testing/upload"
|
"${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/testing/upload"
|
||||||
done
|
done
|
||||||
@@ -72,7 +76,7 @@ jobs:
|
|||||||
for pkg in target/arch/*.pkg.tar.zst; do
|
for pkg in target/arch/*.pkg.tar.zst; do
|
||||||
[ -f "$pkg" ] || continue
|
[ -f "$pkg" ] || continue
|
||||||
curl -f -s -S -X PUT \
|
curl -f -s -S -X PUT \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
--user "${ACTOR}:${TOKEN}" \
|
||||||
--upload-file "$pkg" \
|
--upload-file "$pkg" \
|
||||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/arch/testing/upload"
|
"${GITEA_URL}/api/packages/${REPO_OWNER}/arch/testing/upload"
|
||||||
done
|
done
|
||||||
@@ -81,7 +85,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||||
REPO: ${{ gitea.repository || github.repository }}
|
REPO: ${{ gitea.repository || github.repository }}
|
||||||
TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||||
run: |
|
run: |
|
||||||
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||||
TAG_NAME="v${VERSION}-preview"
|
TAG_NAME="v${VERSION}-preview"
|
||||||
|
|||||||
@@ -19,9 +19,12 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: Install Packaging Tools
|
- name: Install Packaging Tools (Prebuilt Binaries)
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-deb cargo-generate-rpm --locked
|
mkdir -p ~/.cargo/bin
|
||||||
|
curl -fsSL https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -xz -C ~/.cargo/bin
|
||||||
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
~/.cargo/bin/cargo-binstall -y --no-symlinks cargo-deb cargo-generate-rpm
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
@@ -48,13 +51,14 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||||
REPO_OWNER: ${{ gitea.repository_owner || github.repository_owner }}
|
REPO_OWNER: ${{ gitea.repository_owner || github.repository_owner }}
|
||||||
TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
ACTOR: ${{ gitea.actor || github.actor }}
|
||||||
|
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||||
run: |
|
run: |
|
||||||
echo "Veröffentliche Debian-Paket (Distribution: stable, Component: main)..."
|
echo "Veröffentliche Debian-Paket (Distribution: stable, Component: main)..."
|
||||||
for deb in target/debian/*.deb; do
|
for deb in target/debian/*.deb; do
|
||||||
[ -f "$deb" ] || continue
|
[ -f "$deb" ] || continue
|
||||||
curl -f -s -S -X PUT \
|
curl -f -s -S -X PUT \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
--user "${ACTOR}:${TOKEN}" \
|
||||||
--upload-file "$deb" \
|
--upload-file "$deb" \
|
||||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/stable/main/upload"
|
"${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/stable/main/upload"
|
||||||
done
|
done
|
||||||
@@ -63,7 +67,7 @@ jobs:
|
|||||||
for rpm in target/generate-rpm/*.rpm; do
|
for rpm in target/generate-rpm/*.rpm; do
|
||||||
[ -f "$rpm" ] || continue
|
[ -f "$rpm" ] || continue
|
||||||
curl -f -s -S -X PUT \
|
curl -f -s -S -X PUT \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
--user "${ACTOR}:${TOKEN}" \
|
||||||
--upload-file "$rpm" \
|
--upload-file "$rpm" \
|
||||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/stable/upload"
|
"${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/stable/upload"
|
||||||
done
|
done
|
||||||
@@ -72,7 +76,7 @@ jobs:
|
|||||||
for pkg in target/arch/*.pkg.tar.zst; do
|
for pkg in target/arch/*.pkg.tar.zst; do
|
||||||
[ -f "$pkg" ] || continue
|
[ -f "$pkg" ] || continue
|
||||||
curl -f -s -S -X PUT \
|
curl -f -s -S -X PUT \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
--user "${ACTOR}:${TOKEN}" \
|
||||||
--upload-file "$pkg" \
|
--upload-file "$pkg" \
|
||||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/arch/stable/upload"
|
"${GITEA_URL}/api/packages/${REPO_OWNER}/arch/stable/upload"
|
||||||
done
|
done
|
||||||
@@ -81,7 +85,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||||
REPO: ${{ gitea.repository || github.repository }}
|
REPO: ${{ gitea.repository || github.repository }}
|
||||||
TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||||
run: |
|
run: |
|
||||||
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||||
TAG_NAME="v${VERSION}"
|
TAG_NAME="v${VERSION}"
|
||||||
|
|||||||
Reference in New Issue
Block a user