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
|
||||
cache: false
|
||||
|
||||
- name: Install Packaging Tools
|
||||
- name: Install Packaging Tools (Prebuilt Binaries)
|
||||
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
|
||||
run: |
|
||||
@@ -48,13 +51,14 @@ jobs:
|
||||
env:
|
||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||
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: |
|
||||
echo "Veröffentliche Debian-Paket (Distribution: testing, Component: main)..."
|
||||
for deb in target/debian/*.deb; do
|
||||
[ -f "$deb" ] || continue
|
||||
curl -f -s -S -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--user "${ACTOR}:${TOKEN}" \
|
||||
--upload-file "$deb" \
|
||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/testing/main/upload"
|
||||
done
|
||||
@@ -63,7 +67,7 @@ jobs:
|
||||
for rpm in target/generate-rpm/*.rpm; do
|
||||
[ -f "$rpm" ] || continue
|
||||
curl -f -s -S -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--user "${ACTOR}:${TOKEN}" \
|
||||
--upload-file "$rpm" \
|
||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/testing/upload"
|
||||
done
|
||||
@@ -72,7 +76,7 @@ jobs:
|
||||
for pkg in target/arch/*.pkg.tar.zst; do
|
||||
[ -f "$pkg" ] || continue
|
||||
curl -f -s -S -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--user "${ACTOR}:${TOKEN}" \
|
||||
--upload-file "$pkg" \
|
||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/arch/testing/upload"
|
||||
done
|
||||
@@ -81,7 +85,7 @@ jobs:
|
||||
env:
|
||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||
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: |
|
||||
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||
TAG_NAME="v${VERSION}-preview"
|
||||
|
||||
@@ -19,9 +19,12 @@ jobs:
|
||||
toolchain: stable
|
||||
cache: false
|
||||
|
||||
- name: Install Packaging Tools
|
||||
- name: Install Packaging Tools (Prebuilt Binaries)
|
||||
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
|
||||
run: |
|
||||
@@ -48,13 +51,14 @@ jobs:
|
||||
env:
|
||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||
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: |
|
||||
echo "Veröffentliche Debian-Paket (Distribution: stable, Component: main)..."
|
||||
for deb in target/debian/*.deb; do
|
||||
[ -f "$deb" ] || continue
|
||||
curl -f -s -S -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--user "${ACTOR}:${TOKEN}" \
|
||||
--upload-file "$deb" \
|
||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/stable/main/upload"
|
||||
done
|
||||
@@ -63,7 +67,7 @@ jobs:
|
||||
for rpm in target/generate-rpm/*.rpm; do
|
||||
[ -f "$rpm" ] || continue
|
||||
curl -f -s -S -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--user "${ACTOR}:${TOKEN}" \
|
||||
--upload-file "$rpm" \
|
||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/stable/upload"
|
||||
done
|
||||
@@ -72,7 +76,7 @@ jobs:
|
||||
for pkg in target/arch/*.pkg.tar.zst; do
|
||||
[ -f "$pkg" ] || continue
|
||||
curl -f -s -S -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--user "${ACTOR}:${TOKEN}" \
|
||||
--upload-file "$pkg" \
|
||||
"${GITEA_URL}/api/packages/${REPO_OWNER}/arch/stable/upload"
|
||||
done
|
||||
@@ -81,7 +85,7 @@ jobs:
|
||||
env:
|
||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||
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: |
|
||||
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||
TAG_NAME="v${VERSION}"
|
||||
|
||||
Reference in New Issue
Block a user