дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
Bumps the actions group with 14 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/github-script](https://github.com/actions/github-script) | `8.0.0` | `9.0.0` | | [actions/checkout](https://github.com/actions/checkout) | `5.1.0` | `7.0.1` | | [pnpm/action-setup](https://github.com/pnpm/action-setup) | `5.0.0` | `6.1.1` | | [actions/setup-node](https://github.com/actions/setup-node) | `5.0.0` | `7.2.0` | | [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.90.11` | `2.90.12` | | [actions/setup-dotnet](https://github.com/actions/setup-dotnet) | `5` | `6` | | [actions/cache/restore](https://github.com/actions/cache) | `5.1.0` | `6.1.0` | | [actions/cache/save](https://github.com/actions/cache) | `5.1.0` | `6.1.0` | | [actions/setup-python](https://github.com/actions/setup-python) | `5.6.0` | `7.1.0` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `6.0.0` | `7.0.2` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `6.0.0` | `8.0.2` | | [actions/setup-go](https://github.com/actions/setup-go) | `5.6.0` | `7.1.0` | | [actions/setup-java](https://github.com/actions/setup-java) | `4.9.1` | `6.3.0` | | [gradle/actions/setup-gradle](https://github.com/gradle/actions) | `4.4.3` | `6.4.1` | Updates `actions/github-script` from 8.0.0 to 9.0.0 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/ed597411d8f924073f98dfc5c65a23a2325f34cd...3a2844b7e9c422d3c10d287c895573f7108da1b3) Updates `actions/checkout` from 5.1.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `pnpm/action-setup` from 5.0.0 to 6.1.1 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/fc06bc1257f339d1d5d8b3a19a8cae5388b55320...73e46992e05b19abd31f2f3c20e0e7370d762115) Updates `actions/setup-node` from 5.0.0 to 7.2.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/a0853c24544627f65ddf259abe73b1d18a591444...8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce) Updates `taiki-e/install-action` from 2.90.11 to 2.90.12 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/073e1fd0bc889c9aee68dbaaa927cde1b5653a83...43dc658ea8a4fa76c68a84c0acd17c34169b6e2a) Updates `actions/setup-dotnet` from 5 to 6 - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v5...v6) Updates `actions/cache/restore` from 5.1.0 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/caa296126883cff596d87d8935842f9db880ef25...55cc8345863c7cc4c66a329aec7e433d2d1c52a9) Updates `actions/cache/save` from 5.1.0 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/caa296126883cff596d87d8935842f9db880ef25...55cc8345863c7cc4c66a329aec7e433d2d1c52a9) Updates `actions/setup-python` from 5.6.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/a26af69be951a213d495a4c3e4e4022e16d87065...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0) Updates `actions/upload-artifact` from 6.0.0 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/b7c566a772e6b6bfb58ed0dc250532a479d7789f...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `actions/download-artifact` from 6.0.0 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/018cc2cf5baa6db3ef3c5f8a56943fffe632ef53...9000827ccba6bdab643e8b6fd33ac0654aef8333) Updates `actions/setup-go` from 5.6.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/40f1582b2485089dde7abd97c1529aa768e1baff...d8cbb8045d7f43706b9177cceb36c1f91a6644d5) Updates `actions/setup-java` from 4.9.1 to 6.3.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/cf277c60eb25467037889841efdb72551f06f6c3...d1374f8ac74474200d16ef8ecee22c7ae7a51880) Updates `gradle/actions/setup-gradle` from 4.4.3 to 6.4.1 - [Release notes](https://github.com/gradle/actions/releases) - [Commits](https://github.com/gradle/actions/compare/ed408507eac070d1f99cc633dbcf757c94c7933a...8da46b539cd8fe6ab27ca75128919a18d757604c) --- updated-dependencies: - dependency-name: actions/cache/restore dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/cache/save dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/github-script dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-dotnet dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-go dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-java dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-python dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: gradle/actions/setup-gradle dependency-version: 6.4.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: pnpm/action-setup dependency-version: 6.1.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: taiki-e/install-action dependency-version: 2.90.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <[email protected]>
210 рядки
9.1 KiB
YAML
210 рядки
9.1 KiB
YAML
name: Release
|
||
on:
|
||
push:
|
||
tags: ["v*"]
|
||
workflow_dispatch:
|
||
inputs:
|
||
tag:
|
||
description: "Tag to release (e.g. v0.1.0); must already exist"
|
||
required: true
|
||
# nightly.yml: a nightly is a prerelease whose notes start at the previous nightly, without the
|
||
# official plugins, the CNB mirror or the Homebrew cask.
|
||
workflow_call:
|
||
inputs:
|
||
tag: { type: string, required: true }
|
||
nightly: { type: boolean, default: false }
|
||
|
||
permissions:
|
||
contents: read
|
||
|
||
concurrency:
|
||
group: release-${{ inputs.tag || github.ref_name }}
|
||
|
||
env:
|
||
CARGO_TERM_COLOR: always
|
||
CARGO_INCREMENTAL: 0
|
||
TAG: ${{ inputs.tag || github.ref_name }}
|
||
COMMUNITY_PLUGINS_INDEX: https://github.com/l0ng-ai/openidea-plugins/releases/download/index/index.json
|
||
|
||
# The jobs that read a signing key or token, here and in the workflows called below, run in
|
||
# the `release` environment, which holds those secrets.
|
||
jobs:
|
||
# Creates (or reuses) one draft release that every platform build uploads into.
|
||
create-release:
|
||
permissions:
|
||
contents: write
|
||
runs-on: ubuntu-latest
|
||
outputs:
|
||
release_id: ${{ steps.release.outputs.id }}
|
||
steps:
|
||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||
with: { ref: "${{ env.TAG }}" }
|
||
- name: Tag matches app version
|
||
run: |
|
||
app="v$(jq -r .version src-tauri/tauri.conf.json)"
|
||
if [ "$app" != "$TAG" ]; then
|
||
echo "::error::tag $TAG does not match tauri.conf.json version $app"
|
||
exit 1
|
||
fi
|
||
# A shipped plugin API is frozen: its WIT must be the snapshot api_frozen.rs checks later
|
||
# versions against (plugins/README.md, "Evolving the plugin API").
|
||
- name: Plugin API snapshot matches wit/
|
||
run: |
|
||
api() { sed -n 's/^package openidea:plugin@\(.*\);$/\1/p' "$1/plugin.wit"; }
|
||
snapshot=sdk/rust/openidea-plugin/tests/api/released
|
||
if [ "$(api wit)" != "$(api "$snapshot")" ]; then
|
||
echo "::error::plugin API $(api wit) ships without a snapshot ($snapshot is $(api "$snapshot")): copy wit/*.wit to $snapshot/"
|
||
exit 1
|
||
fi
|
||
- id: release
|
||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||
env:
|
||
NIGHTLY: ${{ inputs.nightly == true }}
|
||
with:
|
||
script: |
|
||
const tag = process.env.TAG;
|
||
const { owner, repo } = context.repo;
|
||
const releases = await github.paginate(github.rest.repos.listReleases, { owner, repo });
|
||
const existing = releases.find((r) => r.tag_name === tag);
|
||
if (existing) {
|
||
if (!existing.draft) core.setFailed(`release ${tag} is already published`);
|
||
core.setOutput("id", existing.id);
|
||
return;
|
||
}
|
||
// Prereleases are skipped: the notes span stable release to stable release. A
|
||
// nightly's span from the newest published release, nightly or stable (not the
|
||
// rolling `nightly` release, which only holds the channel's manifest).
|
||
const nightly = process.env.NIGHTLY === "true";
|
||
const previous = releases.find(
|
||
(r) => !r.draft && r.tag_name !== "nightly" && (nightly || !r.prerelease),
|
||
);
|
||
const { data: notes } = await github.rest.repos.generateReleaseNotes({
|
||
owner, repo, tag_name: tag, previous_tag_name: previous?.tag_name,
|
||
});
|
||
const { data } = await github.rest.repos.createRelease({
|
||
owner, repo, tag_name: tag, name: `OpenIDEA ${tag}`,
|
||
draft: true, prerelease: tag.includes("-"), body: notes.body,
|
||
});
|
||
core.setOutput("id", data.id);
|
||
|
||
binaries:
|
||
permissions:
|
||
contents: write
|
||
needs: create-release
|
||
uses: ./.github/workflows/release-build.yml
|
||
with:
|
||
tag: ${{ inputs.tag || github.ref_name }}
|
||
release_id: ${{ needs.create-release.outputs.release_id }}
|
||
secrets: inherit
|
||
|
||
# The official plugins, signed, and the marketplace index released apps read
|
||
# (releases/latest/download/plugins-index.json). They are not in the
|
||
# installers: users install them from Settings › Plugins. Without the
|
||
# signing key (secret PLUGIN_SIGNING_KEY: the file `openidea-plugin keygen`
|
||
# writes) nothing is published and the release goes on. The index also lists
|
||
# the community plugins of the registry (COMMUNITY_PLUGINS_INDEX; refreshed
|
||
# between releases by plugins-index.yml), and the release carries the
|
||
# openidea-plugin tool for Linux x64, which that workflow and the registry's
|
||
# checks run.
|
||
plugins:
|
||
permissions:
|
||
contents: write
|
||
needs: create-release
|
||
name: Official plugins
|
||
environment: release
|
||
runs-on: ubuntu-22.04
|
||
env:
|
||
SIGNING_KEY: ${{ secrets.PLUGIN_SIGNING_KEY }}
|
||
NIGHTLY: ${{ inputs.nightly == true }}
|
||
steps:
|
||
- id: key
|
||
run: |
|
||
if [ "$NIGHTLY" = true ]; then
|
||
echo "a nightly does not publish the official plugins"
|
||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||
elif [ -z "$SIGNING_KEY" ]; then
|
||
echo "::warning::PLUGIN_SIGNING_KEY is not set: the official plugins are not published"
|
||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||
fi
|
||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||
if: steps.key.outputs.skip != 'true'
|
||
with: { ref: "${{ env.TAG }}" }
|
||
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
|
||
if: steps.key.outputs.skip != 'true'
|
||
with: { targets: wasm32-wasip2 }
|
||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
||
if: steps.key.outputs.skip != 'true'
|
||
with: { key: release-plugins }
|
||
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||
if: steps.key.outputs.skip != 'true'
|
||
with: { version: 11 }
|
||
- uses: actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce # v7.2.0
|
||
if: steps.key.outputs.skip != 'true'
|
||
with: { node-version: 22 }
|
||
# Builds the web pages; fails when a checked-in component isn't built from these sources.
|
||
- name: Build
|
||
if: steps.key.outputs.skip != 'true'
|
||
run: |
|
||
plugins/build.sh --check
|
||
cargo build --release --locked -p ide-host --bin openidea-plugin
|
||
- name: Pack, index and upload
|
||
if: steps.key.outputs.skip != 'true'
|
||
shell: bash
|
||
env:
|
||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
run: |
|
||
set -euo pipefail
|
||
tool="$PWD/target/release/openidea-plugin"
|
||
key="$RUNNER_TEMP/openidea.key"
|
||
out="$RUNNER_TEMP/market"
|
||
(umask 077 && printf '%s' "$SIGNING_KEY" > "$key")
|
||
trap 'rm -f "$key"' EXIT
|
||
mkdir -p "$out"
|
||
for dir in plugins/official/*/; do
|
||
id="$(sed -n 's/^id *= *"\(.*\)".*/\1/p' "$dir/plugin.toml" | head -1)"
|
||
version="$(sed -n 's/^version *= *"\(.*\)".*/\1/p' "$dir/plugin.toml" | head -1)"
|
||
"$tool" pack "$dir" --key "$key" --publisher openidea --out "$out/$id-$version.oiplugin"
|
||
done
|
||
# The published index's revocations, earlier keys and community plugins carry over.
|
||
curl -fsSL "https://github.com/$GITHUB_REPOSITORY/releases/latest/download/plugins-index.json" \
|
||
-o "$out/plugins-index.json" || rm -f "$out/plugins-index.json"
|
||
# Downloads point at this release: older versions kept for older IDEs stay where they were published.
|
||
"$tool" index "$out" --publisher openidea --name OpenIDEA --key "$key" --out "$out/plugins-index.json" \
|
||
--download-base "https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG"
|
||
"$tool" merge "$out/plugins-index.json" "$COMMUNITY_PLUGINS_INDEX" --keep openidea ||
|
||
echo "::warning::the community plugins were not refreshed"
|
||
gzip -9 -c "$tool" > "$out/openidea-plugin-linux-x86_64.gz"
|
||
gh release upload "$TAG" "$out"/*.oiplugin "$out/plugins-index.json" \
|
||
"$out/openidea-plugin-linux-x86_64.gz" --clobber
|
||
|
||
publish:
|
||
permissions:
|
||
contents: write
|
||
needs: [create-release, binaries, plugins]
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||
env:
|
||
RELEASE_ID: ${{ needs.create-release.outputs.release_id }}
|
||
with:
|
||
script: |
|
||
await github.rest.repos.updateRelease({
|
||
...context.repo, release_id: Number(process.env.RELEASE_ID), draft: false,
|
||
});
|
||
|
||
# The China mirror the updater's CNB source reads; a failure here leaves the GitHub release as is.
|
||
cnb-mirror:
|
||
needs: publish
|
||
if: ${{ !inputs.nightly }}
|
||
uses: ./.github/workflows/cnb-mirror.yml
|
||
with: { tag: "${{ inputs.tag || github.ref_name }}" }
|
||
secrets: inherit
|
||
|
||
# The cask in l0ng-ai/homebrew-tap; skipped for prereleases and without HOMEBREW_TAP_DEPLOY_KEY.
|
||
homebrew:
|
||
needs: publish
|
||
if: ${{ !inputs.nightly }}
|
||
uses: ./.github/workflows/homebrew.yml
|
||
with: { tag: "${{ inputs.tag || github.ref_name }}" }
|
||
secrets: inherit
|