Skip to content

Commit

Permalink
chore: update release paths
Browse files Browse the repository at this point in the history
  • Loading branch information
denbezrukov committed Aug 11, 2023
1 parent 21b9981 commit a35455c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release_js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
id: version
with:
diff-search: true
file-name: npm/js-api/package.json
file-name: packages/@biomejs/js-api/package.json

- name: Set version name
run: echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
if: needs.check.outputs.prerelease == 'true'
run: |
echo "prerelease=true" >> $GITHUB_ENV
node npm/js-api/scripts/update-nightly-version.mjs >> $GITHUB_ENV
node packages/@biomejs/js-api/scripts/update-nightly-version.mjs >> $GITHUB_ENV
- name: Set release infos
if: needs.check.outputs.prerelease != 'true'
run: |
Expand All @@ -103,7 +103,7 @@ jobs:
pnpm --prefix packages/@biomejs/backend-jsonrpc run build
- name: Build package
working-directory: npm/js-api
working-directory: packages/@biomejs/js-api
run: |
pnpm i
pnpm build
Expand All @@ -113,7 +113,7 @@ jobs:
with:
name: js-api
path: |
./npm/js-api/dist
./packages/@biomejs/js-api/dist
if-no-files-found: error

publish:
Expand All @@ -128,7 +128,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: js-api
path: npm/js-api/dist
path: packages/@biomejs/js-api/dist

- name: Install Node.js
uses: actions/setup-node@v3
Expand All @@ -138,15 +138,15 @@ jobs:

- name: Set release infos
if: needs.build.outputs.prerelease == 'true'
run: node npm/js-api/scripts/update-nightly-version.mjs
run: node packages/@biomejs/js-api/scripts/update-nightly-version.mjs

- name: Publish npm package as latest
run: npm publish npm/js-api --tag latest --access public
run: npm publish packages/@biomejs/js-api --tag latest --access public
if: needs.build.outputs.prerelease != 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish npm package as nightly
run: npm publish npm/js-api --tag nightly --access public
run: npm publish packages/@biomejs/js-api --tag nightly --access public
if: needs.build.outputs.prerelease == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release_lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
# LSP Extension Version
version: ${{ env.version }}

# Version of the Rome binary
rome_version: ${{ env.rome_version }}
# Version of the Biome binary
biome_version: ${{ env.biome_version }}
prerelease: ${{ env.prerelease }}
nightly: ${{ env.nightly }}
version_changed: ${{ steps.version.outputs.changed }}
Expand All @@ -38,34 +38,34 @@ jobs:
diff-search: true
file-name: editors/vscode/package.json

- name: Check Rome version changes
- name: Check Biome version changes
uses: EndBug/version-check@v1
if: env.nightly != 'true'
id: rome_version
id: biome_version
with:
diff-search: true
file-name: packages/@biomejs/biome/package.json

- name: Set version name
run: |
echo "version=${{ steps.version.outputs.version }}" >> $GITHUB_ENV
echo "rome_version=${{ steps.rome_version.outputs.version }}" >> $GITHUB_ENV
echo "biome_version=${{ steps.biome_version.outputs.version }}" >> $GITHUB_ENV
- name: Check prerelease status
id: prerelease
if: env.nightly == 'true' || steps.version.outputs.type == 'prerelease' || steps.version.outputs.type == 'prepatch' || steps.version.outputs.type == 'premajor' || steps.version.outputs.type == 'preminor'
run: |
echo "prerelease=true" >> $GITHUB_ENV
node ./editors/vscode/scripts/update-nightly-version.mjs >> $GITHUB_ENV
echo "rome_version=$(node ./npm/rome/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV
echo "biome_version=$(node packages/@biomejs/biome/scripts/update-nightly-version.mjs)" >> $GITHUB_ENV
- name: Check version status
if: steps.version.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"'

- name: Rome Check version status
if: steps.rome_version.outputs.changed == 'true'
run: 'echo "Rome Version change found! New version: ${{ steps.rome_version.outputs.version }} (${{ steps.rome_version.outputs.version_type }})"'
- name: Biome Check version status
if: steps.biome_version.outputs.changed == 'true'
run: 'echo "Biome Version change found! New version: ${{ steps.biome_version.outputs.version }} (${{ steps.biome_version.outputs.version_type }})"'

build:
strategy:
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
# Strip all debug symbols from the resulting binaries
RUSTFLAGS: "-C strip=symbols"
BIOME_VERSION: ${{ needs.check.outputs.rome_version }}
BIOME_VERSION: ${{ needs.check.outputs.biome_version }}

- name: Copy LSP binary
if: matrix.os == 'windows-2022'
Expand Down
6 changes: 3 additions & 3 deletions crates/rome_cli/src/service/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ pub(crate) fn enumerate_pipes() -> io::Result<impl Iterator<Item = String>> {
let file_name = entry.file_name()?;
let file_name = file_name.to_str()?;

let rome_version = file_name.strip_prefix("rome-socket")?;
if rome_version.is_empty() {
let version = file_name.strip_prefix("rome-socket")?;
if version.is_empty() {
Some(String::new())
} else {
Some(rome_version.strip_prefix('-')?.to_string())
Some(version.strip_prefix('-')?.to_string())
}
})
})
Expand Down
6 changes: 3 additions & 3 deletions crates/rome_cli/src/service/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ pub(crate) fn enumerate_pipes() -> io::Result<impl Iterator<Item = String>> {
let file_name = entry.file_name()?;
let file_name = file_name.to_str()?;

let rome_version = file_name.strip_prefix("rome-service")?;
if rome_version.is_empty() {
let version = file_name.strip_prefix("rome-service")?;
if version.is_empty() {
Some(String::new())
} else {
Some(rome_version.strip_prefix('-')?.to_string())
Some(version.strip_prefix('-')?.to_string())
}
})
})
Expand Down

0 comments on commit a35455c

Please sign in to comment.