Stop running some release workflows on forks and update old URLs

This commit is contained in:
Laurențiu Nicola 2025-02-01 08:21:14 +02:00
parent 3c2aca1e5e
commit b0276dd240
6 changed files with 17 additions and 12 deletions

View file

@ -11,6 +11,7 @@ on:
jobs:
publish:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
name: publish
runs-on: ubuntu-latest
steps:

View file

@ -9,6 +9,7 @@ on:
jobs:
publish-libs:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
name: publish
runs-on: ubuntu-latest
steps:

View file

@ -22,6 +22,7 @@ env:
jobs:
dist:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
strategy:
matrix:
include:
@ -138,6 +139,7 @@ jobs:
path: ./dist
dist-x86_64-unknown-linux-musl:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
name: dist (x86_64-unknown-linux-musl)
runs-on: ubuntu-latest
env:
@ -183,6 +185,7 @@ jobs:
path: ./dist
publish:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
name: publish
runs-on: ubuntu-latest
needs: ["dist", "dist-x86_64-unknown-linux-musl"]
@ -257,24 +260,24 @@ jobs:
working-directory: ./editors/code
- name: Publish Extension (Code Marketplace, release)
if: github.ref == 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
if: github.ref == 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
working-directory: ./editors/code
# token from https://dev.azure.com/rust-analyzer/
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
- name: Publish Extension (OpenVSX, release)
if: github.ref == 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
if: github.ref == 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
working-directory: ./editors/code
run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
timeout-minutes: 2
- name: Publish Extension (Code Marketplace, nightly)
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
if: github.ref != 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
working-directory: ./editors/code
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix --pre-release
- name: Publish Extension (OpenVSX, nightly)
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
if: github.ref != 'refs/heads/release' && github.repository == 'rust-lang/rust-analyzer'
working-directory: ./editors/code
run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
timeout-minutes: 2

View file

@ -1,6 +1,6 @@
<p align="center">
<img
src="https://raw.githubusercontent.com/rust-analyzer/rust-analyzer/master/assets/logo-wide.svg"
src="https://raw.githubusercontent.com/rust-lang/rust-analyzer/master/assets/logo-wide.svg"
alt="rust-analyzer logo">
</p>

View file

@ -549,18 +549,18 @@ impl Macro {
}
"pr" => {
let pr = &self.target;
let url = format!("https://github.com/rust-analyzer/rust-analyzer/pull/{pr}");
let url = format!("https://github.com/rust-lang/rust-analyzer/pull/{pr}");
format!("[`#{pr}`]({url})")
}
"commit" => {
let hash = &self.target;
let short = &hash[0..7];
let url = format!("https://github.com/rust-analyzer/rust-analyzer/commit/{hash}");
let url = format!("https://github.com/rust-lang/rust-analyzer/commit/{hash}");
format!("[`{short}`]({url})")
}
"release" => {
let date = &self.target;
let url = format!("https://github.com/rust-analyzer/rust-analyzer/releases/{date}");
let url = format!("https://github.com/rust-lang/rust-analyzer/releases/{date}");
format!("[`{date}`]({url})")
}
_ => bail!("macro not supported: {name}"),

View file

@ -2,12 +2,12 @@
Hello!
Commit: [`0123456`](https://github.com/rust-analyzer/rust-analyzer/commit/0123456789abcdef0123456789abcdef01234567) \
Release: [`2022-01-01`](https://github.com/rust-analyzer/rust-analyzer/releases/2022-01-01)
Commit: [`0123456`](https://github.com/rust-lang/rust-analyzer/commit/0123456789abcdef0123456789abcdef01234567) \
Release: [`2022-01-01`](https://github.com/rust-lang/rust-analyzer/releases/2022-01-01)
## New Features
- **BREAKING** [`#1111`](https://github.com/rust-analyzer/rust-analyzer/pull/1111) shortcut <kbd>ctrl</kbd>+<kbd>r</kbd>
- **BREAKING** [`#1111`](https://github.com/rust-lang/rust-analyzer/pull/1111) shortcut <kbd>ctrl</kbd>+<kbd>r</kbd>
- hyphen-prefixed list item
- nested list item
- `foo` -> `foofoo`
@ -65,7 +65,7 @@ Release: [`2022-01-01`](https://github.com/rust-analyzer/rust-analyzer/releases/
- list item with an inline image
![](https://example.com/animation.gif)
The highlight of the month is probably [`#1111`](https://github.com/rust-analyzer/rust-analyzer/pull/1111).
The highlight of the month is probably [`#1111`](https://github.com/rust-lang/rust-analyzer/pull/1111).
See [online manual](https://example.com/manual) for more information.
```bash