mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
Bumps the github-dependencies group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `5.0.0` | `6.0.0` | | [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.62.63` | `2.63.3` | | [cachix/install-nix-action](https://github.com/cachix/install-nix-action) | `31.8.4` | `31.9.0` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `7.1.5` | `7.1.6` | | [github/codeql-action](https://github.com/github/codeql-action) | `4.31.7` | `4.31.8` | Updates `actions/upload-artifact` from 5.0.0 to 6.0.0 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](330a01c490...b7c566a772) Updates `taiki-e/install-action` from 2.62.63 to 2.63.3 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](50708e9ba8...d850aa8169) Updates `cachix/install-nix-action` from 31.8.4 to 31.9.0 - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md) - [Commits](0b0e072294...4e002c8ec8) Updates `astral-sh/setup-uv` from 7.1.5 to 7.1.6 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](ed21f2f24f...681c641aba) Updates `github/codeql-action` from 4.31.7 to 4.31.8 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](cf1bb45a27...1b168cd394) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-dependencies - dependency-name: taiki-e/install-action dependency-version: 2.63.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: cachix/install-nix-action dependency-version: 31.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: astral-sh/setup-uv dependency-version: 7.1.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github/codeql-action dependency-version: 4.31.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
155 lines
5.3 KiB
YAML
155 lines
5.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions: read-all
|
|
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
jobs:
|
|
build-release:
|
|
name: build-release
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build: [linux-x86_64-musl, linux-aarch64-musl, macos-x86_64, macos-aarch64, win-x86_64, win-aarch64]
|
|
include:
|
|
- build: linux-x86_64-musl
|
|
os: ubuntu-24.04
|
|
target: x86_64-unknown-linux-musl
|
|
- build: linux-aarch64-musl
|
|
os: ubuntu-24.04-arm
|
|
target: aarch64-unknown-linux-musl
|
|
- build: macos-x86_64
|
|
os: macos-15
|
|
target: x86_64-apple-darwin
|
|
- build: macos-aarch64
|
|
os: macos-15
|
|
target: aarch64-apple-darwin
|
|
- build: win-x86_64
|
|
os: windows-2022
|
|
target: x86_64-pc-windows-msvc
|
|
- build: win-aarch64
|
|
os: windows-11-arm
|
|
target: aarch64-pc-windows-msvc
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
|
with:
|
|
persist-credentials: false
|
|
- name: Install packages (Ubuntu)
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
|
|
with:
|
|
toolchain: stable
|
|
target: ${{ matrix.target }}
|
|
- name: Build release binary
|
|
shell: bash
|
|
run: cargo build --target ${{ matrix.target }} --verbose --release
|
|
- name: Build archive
|
|
shell: bash
|
|
run: |
|
|
outdir="target/${{ matrix.target }}/release"
|
|
staging="jj-${RELEASE_TAG_NAME}-${{ matrix.target }}"
|
|
mkdir "$staging"
|
|
cp {README.md,LICENSE} "$staging/"
|
|
if [[ "${{ matrix.os }}" == windows* ]]; then
|
|
cp "$outdir/jj.exe" "$staging/"
|
|
cd "$staging"
|
|
7z a "../$staging.zip" .
|
|
echo "ASSET=$staging.zip" >> $GITHUB_ENV
|
|
else
|
|
cp "$outdir/jj" "$staging/"
|
|
tar czf "$staging.tar.gz" -C "$staging" .
|
|
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
|
|
fi
|
|
env:
|
|
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
|
|
- name: Upload release archive
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ${{ env.ASSET }}
|
|
asset_name: ${{ env.ASSET }}
|
|
asset_content_type: application/octet-stream
|
|
|
|
docs-release-archive:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Install packages (Ubuntu)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
|
|
with:
|
|
version: "0.5.1"
|
|
- name: Compile docs and zip them up
|
|
run: |
|
|
uv run mkdocs build
|
|
archive="jj-${RELEASE_TAG_NAME}-docs-html.tar.gz"
|
|
tar czf "$archive" -C "rendered-docs" .
|
|
echo "ASSET=$archive" >> $GITHUB_ENV
|
|
env:
|
|
MKDOCS_OFFLINE: true
|
|
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
|
|
- name: Upload release archive
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ${{ env.ASSET }}
|
|
asset_name: ${{ env.ASSET }}
|
|
asset_content_type: application/octet-stream
|
|
|
|
docs-deploy-website-latest-release:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
|
with:
|
|
# `.github/scripts/docs-build-deploy` will need to `git push` to the docs branch
|
|
persist-credentials: true
|
|
- run: "git fetch origin gh-pages --depth=1"
|
|
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
|
|
with:
|
|
version: "0.5.1"
|
|
- name: Install dependencies, compile and deploy docs to the "latest release" section of the website
|
|
run: |
|
|
git config user.name 'jj-docs[bot]'
|
|
git config user.email 'jj-docs[bot]@users.noreply.github.io'
|
|
# Using the 'latest' tag below makes the website default
|
|
# to this version.
|
|
.github/scripts/docs-build-deploy "${RELEASE_TAG_NAME}" latest --update-aliases --push
|
|
env:
|
|
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
|
|
- name: "Show `git diff --stat`"
|
|
run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)"
|