Skip to content

Commit

Permalink
chore(org): updates for LizardByte (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Nov 2, 2024
1 parent 6b794d3 commit 46dccbc
Show file tree
Hide file tree
Showing 33 changed files with 1,423 additions and 1,345 deletions.
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

93 changes: 76 additions & 17 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,78 @@
---
# This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- dependabot
- github-actions
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- dependencies
- dependabot
- rust
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
time: "07:30"
open-pull-requests-limit: 10

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "08:30"
open-pull-requests-limit: 10
groups:
docker-actions:
applies-to: version-updates
patterns:
- "docker/*"
github-actions:
applies-to: version-updates
patterns:
- "actions/*"
- "github/*"
lizardbyte-actions:
applies-to: version-updates
patterns:
- "LizardByte/*"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
time: "09:00"
open-pull-requests-limit: 10
groups:
dev-dependencies:
applies-to: version-updates
dependency-type: "development"

- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "daily"
time: "09:30"
open-pull-requests-limit: 10

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
time: "10:00"
open-pull-requests-limit: 10
groups:
pytest-dependencies:
applies-to: version-updates
patterns:
- "pytest*"

- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
time: "10:30"
open-pull-requests-limit: 10
14 changes: 14 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# This is the configuration file for https://github.com/Ezard/semantic-prs

enabled: true
titleOnly: true # We only use the PR title as we squash and merge
commitsOnly: false
titleAndCommits: false
anyCommit: false
allowMergeCommits: false
allowRevertCommits: false
111 changes: 111 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
name: CI

on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
push:
branches: [master]
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
setup_release:
name: Setup Release
outputs:
publish_release: ${{ steps.setup_release.outputs.publish_release }}
release_body: ${{ steps.setup_release.outputs.release_body }}
release_commit: ${{ steps.setup_release.outputs.release_commit }}
release_generate_release_notes: ${{ steps.setup_release.outputs.release_generate_release_notes }}
release_tag: ${{ steps.setup_release.outputs.release_tag }}
release_version: ${{ steps.setup_release.outputs.release_version }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Release
id: setup_release
uses: LizardByte/setup-release-action@v2024.919.143601
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build
needs: setup_release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: |
~/work/_temp/_github_home/.cargo/registry
~/work/_temp/_github_home/.cargo/git
target
key: ${{ github.job }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ github.job }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
${{ github.job }}-${{ hashFiles('rust-toolchain.toml') }}-
- name: Update Version
if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
run: |
cargo install cargo-edit
cargo set-version ${{ needs.setup_release.outputs.release_version }}
- name: Test
uses: ./ci/github-actions/arch-run
with:
command: cargo test

- name: Clippy
uses: ./ci/github-actions/arch-run
with:
command: cargo clippy -- -D warnings

- name: Install toolchain
uses: ./ci/github-actions/arch-run
with:
command: rustup target add x86_64-unknown-linux-gnu

- name: Build
uses: ./ci/github-actions/arch-run
with:
command: cargo build --target x86_64-unknown-linux-gnu --release

- name: Strip all debug symbols
uses: ./ci/github-actions/arch-run
with:
command: strip --strip-all target/x86_64-unknown-linux-gnu/release/build-pacman-repo

- name: Enable reading of cache
continue-on-error: true
uses: ./ci/github-actions/arch-run
with:
command: chmod -R a+rwX $HOME/.cargo target

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build-pacman-repo-x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu/release/build-pacman-repo

- name: Create/Update GitHub Release
if: ${{ needs.setup_release.outputs.publish_release == 'true' }}
uses: LizardByte/create-release-action@v2024.919.143026
with:
allowUpdates: true
artifacts: 'target/x86_64-unknown-linux-gnu/release/build-pacman-repo'
body: ${{ needs.setup_release.outputs.release_body }}
generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }}
name: ${{ needs.setup_release.outputs.release_tag }}
prerelease: true
tag: ${{ needs.setup_release.outputs.release_tag }}
token: ${{ secrets.GH_BOT_TOKEN }}
Loading

0 comments on commit 46dccbc

Please sign in to comment.