mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
ci: publish apt repo
This commit is contained in:
parent
776d708ede
commit
d4c878893b
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
|
|
@ -91,9 +91,8 @@ jobs:
|
||||||
uses: ./.github/workflows/test.yml
|
uses: ./.github/workflows/test.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
permissions:
|
permissions:
|
||||||
"contents": "read"
|
"contents": "write"
|
||||||
"id-token": "write"
|
"id-token": "write"
|
||||||
"pages": "write"
|
|
||||||
|
|
||||||
# Build and packages all the platform-specific things
|
# Build and packages all the platform-specific things
|
||||||
build-local-artifacts:
|
build-local-artifacts:
|
||||||
|
|
@ -325,16 +324,31 @@ jobs:
|
||||||
"id-token": "write"
|
"id-token": "write"
|
||||||
"packages": "write"
|
"packages": "write"
|
||||||
|
|
||||||
|
custom-apt:
|
||||||
|
needs:
|
||||||
|
- plan
|
||||||
|
- host
|
||||||
|
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
|
||||||
|
uses: ./.github/workflows/apt.yml
|
||||||
|
with:
|
||||||
|
plan: ${{ needs.plan.outputs.val }}
|
||||||
|
secrets: inherit
|
||||||
|
# publish jobs get escalated permissions
|
||||||
|
permissions:
|
||||||
|
"contents": "write"
|
||||||
|
"id-token": "write"
|
||||||
|
|
||||||
announce:
|
announce:
|
||||||
needs:
|
needs:
|
||||||
- plan
|
- plan
|
||||||
- host
|
- host
|
||||||
- custom-publish
|
- custom-publish
|
||||||
- custom-winget
|
- custom-winget
|
||||||
|
- custom-apt
|
||||||
# use "always() && ..." to allow us to wait for all publish jobs while
|
# use "always() && ..." to allow us to wait for all publish jobs while
|
||||||
# still allowing individual publish jobs to skip themselves (for prereleases).
|
# still allowing individual publish jobs to skip themselves (for prereleases).
|
||||||
# "host" however must run to completion, no skipping allowed!
|
# "host" however must run to completion, no skipping allowed!
|
||||||
if: ${{ always() && needs.host.result == 'success' && (needs.custom-publish.result == 'skipped' || needs.custom-publish.result == 'success') && (needs.custom-winget.result == 'skipped' || needs.custom-winget.result == 'success') }}
|
if: ${{ always() && needs.host.result == 'success' && (needs.custom-publish.result == 'skipped' || needs.custom-publish.result == 'success') && (needs.custom-winget.result == 'skipped' || needs.custom-winget.result == 'success') && (needs.custom-apt.result == 'skipped' || needs.custom-apt.result == 'success') }}
|
||||||
runs-on: "ubuntu-22.04"
|
runs-on: "ubuntu-22.04"
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
29
.github/workflows/test.yml
vendored
29
.github/workflows/test.yml
vendored
|
|
@ -93,6 +93,8 @@ jobs:
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- *linux-deps
|
- *linux-deps
|
||||||
- *checkout
|
- *checkout
|
||||||
|
|
@ -120,26 +122,14 @@ jobs:
|
||||||
status: ${{ env.COVERAGE_PERCENT }}
|
status: ${{ env.COVERAGE_PERCENT }}
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
path: 'target/llvm-cov/html/coverage.svg'
|
path: 'target/llvm-cov/html/coverage.svg'
|
||||||
- name: "Upload default branch results to gh pages"
|
- name: "Deploy coverage to gh-pages under /coverage"
|
||||||
if: *if-master
|
if: *if-master
|
||||||
uses: actions/upload-pages-artifact@v5
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
path: target/llvm-cov/html
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: target/llvm-cov/html
|
||||||
deploy-coverage-page:
|
destination_dir: coverage
|
||||||
if: *if-master
|
keep_files: true
|
||||||
needs: coverage
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
steps:
|
|
||||||
- name: "Deploy gh pages"
|
|
||||||
id: deployment
|
|
||||||
uses: actions/deploy-pages@v5
|
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
runs-on: ${{matrix.runner}}
|
runs-on: ${{matrix.runner}}
|
||||||
|
|
@ -269,7 +259,6 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- nextest
|
- nextest
|
||||||
- coverage
|
- coverage
|
||||||
- deploy-coverage-page
|
|
||||||
- clippy
|
- clippy
|
||||||
- rustfmt
|
- rustfmt
|
||||||
- clippy-no-default-features
|
- clippy-no-default-features
|
||||||
|
|
@ -284,4 +273,4 @@ jobs:
|
||||||
echo "One or more required jobs failed or were cancelled."
|
echo "One or more required jobs failed or were cancelled."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "All required jobs passed (deploy-coverage-page is expected to skip off master)."
|
echo "All required jobs passed."
|
||||||
|
|
|
||||||
22
README.md
22
README.md
|
|
@ -6,7 +6,7 @@
|
||||||
<img src="https://github.com/skim-rs/skim/actions/workflows/test.yml/badge.svg?event=push" alt="Build & Test" />
|
<img src="https://github.com/skim-rs/skim/actions/workflows/test.yml/badge.svg?event=push" alt="Build & Test" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://skim-rs.github.io/skim" >
|
<a href="https://skim-rs.github.io/skim" >
|
||||||
<img src="https://skim-rs.github.io/skim/coverage.svg" alt="coverage badge" />
|
<img src="https://skim-rs.github.io/skim/coverage/coverage.svg" alt="coverage badge" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://repology.org/project/skim-fuzzy-finder/versions">
|
<a href="https://repology.org/project/skim-fuzzy-finder/versions">
|
||||||
<img src="https://repology.org/badge/tiny-repos/skim-fuzzy-finder.svg" alt="Packaging status" />
|
<img src="https://repology.org/badge/tiny-repos/skim-fuzzy-finder.svg" alt="Packaging status" />
|
||||||
|
|
@ -101,6 +101,7 @@ The skim project contains several components:
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
### Fedora
|
### Fedora
|
||||||
|
|
||||||
Up to date Fedora packages are provided via an unofficial community-maintained COPR repository.
|
Up to date Fedora packages are provided via an unofficial community-maintained COPR repository.
|
||||||
```bash
|
```bash
|
||||||
sudo dnf copr enable sisyphus1813/skim
|
sudo dnf copr enable sisyphus1813/skim
|
||||||
|
|
@ -108,6 +109,7 @@ sudo dnf install skim
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
Using [winget](https://learn.microsoft.com/windows/package-manager/):
|
Using [winget](https://learn.microsoft.com/windows/package-manager/):
|
||||||
```powershell
|
```powershell
|
||||||
winget install skim
|
winget install skim
|
||||||
|
|
@ -118,6 +120,7 @@ scoop install skim
|
||||||
```
|
```
|
||||||
|
|
||||||
### Debian and RPM packages
|
### Debian and RPM packages
|
||||||
|
|
||||||
Every [release](https://github.com/skim-rs/skim/releases/latest) ships prebuilt
|
Every [release](https://github.com/skim-rs/skim/releases/latest) ships prebuilt
|
||||||
`.deb` and `.rpm` packages for `amd64` and `arm64`. Each one installs the `sk`
|
`.deb` and `.rpm` packages for `amd64` and `arm64`. Each one installs the `sk`
|
||||||
executable, its man page and the bash/zsh/fish completions.
|
executable, its man page and the bash/zsh/fish completions.
|
||||||
|
|
@ -132,6 +135,23 @@ sudo dpkg -i skim_*_amd64.deb
|
||||||
sudo rpm -i skim-*.x86_64.rpm
|
sudo rpm -i skim-*.x86_64.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### APT repository (Debian/Ubuntu)
|
||||||
|
|
||||||
|
Instead of downloading a `.deb` manually, add the hosted APT repository to get
|
||||||
|
`sk` from `apt` and receive updates:
|
||||||
|
```sh
|
||||||
|
# Import the signing key
|
||||||
|
sudo mkdir -p /etc/apt/keyrings
|
||||||
|
sudo wget -O /etc/apt/keyrings/skim.asc https://skim-rs.github.io/skim/apt/skim-archive-keyring.asc
|
||||||
|
# ...or with curl:
|
||||||
|
# curl -fsSL https://skim-rs.github.io/skim/apt/skim-archive-keyring.asc | sudo tee /etc/apt/keyrings/skim.asc > /dev/null
|
||||||
|
|
||||||
|
# Add the repository
|
||||||
|
echo 'deb [signed-by=/etc/apt/keyrings/skim.asc] https://skim-rs.github.io/skim/apt ./' | sudo tee /etc/apt/sources.list.d/skim.list
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install skim
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Manually
|
## Manually
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,14 @@ plan-jobs = ["./test"]
|
||||||
# Global artifacts jobs to run in CI
|
# Global artifacts jobs to run in CI
|
||||||
global-artifacts-jobs = ["./package"]
|
global-artifacts-jobs = ["./package"]
|
||||||
# Publish jobs to run in CI
|
# Publish jobs to run in CI
|
||||||
publish-jobs = ["./publish", "./winget"]
|
publish-jobs = ["./publish", "./winget", "./apt"]
|
||||||
# Whether to publish prereleases to package managers
|
# Whether to publish prereleases to package managers
|
||||||
publish-prereleases = true
|
publish-prereleases = true
|
||||||
|
|
||||||
[dist.github-custom-job-permissions.test]
|
[dist.github-custom-job-permissions.test]
|
||||||
contents = "read"
|
contents = "write"
|
||||||
pages = "write"
|
id-token = "write"
|
||||||
|
|
||||||
|
[dist.github-custom-job-permissions.apt]
|
||||||
|
contents = "write"
|
||||||
id-token = "write"
|
id-token = "write"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue