Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
williamboman committed Jun 7, 2024
2 parents d75b9d0 + 225949a commit ec49b37
Show file tree
Hide file tree
Showing 189 changed files with 459 additions and 1,791 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:

jobs:
validate:
name: Actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: reviewdog/action-actionlint@v1
19 changes: 0 additions & 19 deletions .github/workflows/package-lint.yaml

This file was deleted.

105 changes: 13 additions & 92 deletions .github/workflows/package-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,99 +11,20 @@ on:
required: true

jobs:
package-diff:
name: Check package diffs
lint:
name: Registry lint
runs-on: ubuntu-latest
outputs:
all_changed_files: ${{ steps.changed-packages.outputs.all_changed_files }}
any_changed: ${{ steps.changed-packages.outputs.any_changed }}

steps:
- uses: actions/checkout@v3
- name: Get changed package definitions
id: changed-packages
uses: tj-actions/changed-files@v36
with:
files: |
packages/**/package.yaml
validate:
name: Validate package definitions
runs-on: ubuntu-latest
needs: package-diff
if: ${{ github.event.inputs.packages || needs.package-diff.outputs.any_changed == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: mason-org/actions/validate-schema@v1
- uses: actions/checkout@v4
with:
packages: ${{ github.event.inputs.packages || needs.package-diff.outputs.all_changed_files }}

tests:
name: Test packages
needs: [package-diff, validate]
if: ${{ github.event.inputs.packages || needs.package-diff.outputs.any_changed == 'true' }}
strategy:
fail-fast: false
matrix:
# If making changes remember to update the manual workflow as well.
target:
- darwin_arm64
- darwin_x64
- linux_arm
- linux_arm64
- linux_arm64_gnu
- linux_arm_gnu
- linux_x64
- linux_x64_gnu
- linux_x86
- win_arm
- win_arm64
- win_x64
- win_x86

include:
- target: linux_x64
runs-on: ubuntu-latest
- target: linux_x64_gnu
runs-on: ubuntu-latest
- target: linux_x86
runs-on: ubuntu-latest
- target: linux_arm
runs-on: ubuntu-latest
- target: linux_arm_gnu
runs-on: ubuntu-latest
- target: linux_arm64
runs-on: ubuntu-latest
- target: linux_arm64_gnu
runs-on: ubuntu-latest
- target: darwin_x64
runs-on: macos-latest
- target: darwin_arm64
runs-on: macos-latest
- target: win_x64
runs-on: windows-latest
- target: win_x86
runs-on: windows-latest
- target: win_arm64
runs-on: windows-latest
- target: win_arm
runs-on: windows-latest

runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: mason-org/actions/tests@v1
fetch-depth: 1
- uses: mason-org/actions/registry-lint@v1
with:
packages: ${{ github.event.inputs.packages || needs.package-diff.outputs.all_changed_files }}
target: ${{ matrix.target }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# This job is used for branch protection rule
# Add this job to `Status checks that are required`
status-check:
name: Status check
runs-on: ubuntu-latest
needs: tests
if: 'failure() || cancelled()'
steps:
- run: exit 1
packages: ${{ github.event.inputs.packages }}

test:
name: Package tests
needs: lint
uses: mason-org/actions/.github/workflows/package-tests.yaml@v1
with:
packages: ${{ github.event.inputs.packages }}
65 changes: 1 addition & 64 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,14 @@ name: Release

on:
push:
tags:
- "**"
branches:
- main

jobs:
tag:
name: Tag
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
tag: ${{ steps.tag.outputs.tag }}
should-release: ${{ steps.tag.outputs.should-release }}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- id: adjnoun
uses: mason-org/actions/adj-noun-generator@v1
- id: tag
name: Get/create tag
shell: bash
run: |
if [[ $GITHUB_REF =~ ^refs/tags ]]; then
echo "Releasing tag $GITHUB_REF_NAME"
printf "tag=%s\nshould-release=true" "$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT"
elif [[ $(git diff-tree --name-only --no-commit-id HEAD -- packages | wc -l) -gt 0 ]]; then
declare TAG
TAG=$(date +%Y-%m-%d)-$ADJNOUN
printf "tag=%s\nshould-release=true" "$TAG" >> "$GITHUB_OUTPUT"
echo "Tagging and pushing $TAG"
git tag "$TAG" HEAD
git push origin "$TAG"
else
echo "No tag was pushed, and no package definition was changed."
echo "should-release=false" >> "$GITHUB_OUTPUT"
fi
env:
GITHUB_REF: ${{ github.ref }}
GITHUB_REF_NAME: ${{ github.ref_name }}
ADJNOUN: ${{ steps.adjnoun.outputs.word }}

release:
needs: [tag]
if: ${{ needs.tag.outputs.should-release == 'true' }}
name: Release
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
- name: Set up yq
shell: bash
run: |
sudo curl -fL "https://github.com/mikefarah/yq/releases/download/v4.30.6/yq_linux_amd64" -o /usr/local/bin/yq
sudo chmod +x /usr/local/bin/yq
- name: Compile
shell: bash
run: |
yq ea '[.]' -o json packages/*/package.yaml > registry.json
zip -r registry.json.zip registry.json
sha256sum registry.json registry.json.zip > checksums.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.tag.outputs.tag }}
fail_on_unmatched_files: true
generate_release_notes: false
files: |
registry.json.zip
checksums.txt
- uses: mason-org/actions/registry-release@v1
5 changes: 3 additions & 2 deletions .github/workflows/validate-renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ on:

jobs:
validate:
name: Validate renovate config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check for config changes
id: diff
uses: tj-actions/changed-files@v36
uses: tj-actions/changed-files@v44
with:
files: |
renovate.json5
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
# Schema

Package definitions are validated against a well-defined [JSON schema](./schemas/). The full schema is hosted on
<http://schemastore.org/>.
Package definitions are validated against a well-defined [JSON schema](https://github.com/mason-org/registry-schema).
The full schema is hosted on <http://schemastore.org/>.

> [!TIP]
> Use [b0o/SchemaStore.nvim](https://github.com/b0o/SchemaStore.nvim) and the [YAML language
Expand Down
2 changes: 1 addition & 1 deletion packages/actionlint/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- Linter

source:
id: pkg:github/rhysd/[email protected].0
id: pkg:github/rhysd/[email protected].1
asset:
- target: darwin_x64
file: actionlint_{{ version | strip_prefix "v" }}_darwin_amd64.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-language-server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories:
- LSP

source:
id: pkg:npm/%40angular/language-server@17.3.2
id: pkg:npm/%40angular/language-server@18.0.0
extra_packages:
- [email protected]

Expand Down
2 changes: 1 addition & 1 deletion packages/ansible-lint/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories:
- Linter

source:
id: pkg:pypi/ansible-lint@24.2.3
id: pkg:pypi/ansible-lint@24.6.0
supported_platforms:
- unix

Expand Down
2 changes: 1 addition & 1 deletion packages/antlers-language-server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories:
- LSP

source:
id: pkg:npm/[email protected].11
id: pkg:npm/[email protected].12

bin:
antlersls: npm:antlersls
2 changes: 1 addition & 1 deletion packages/apex-language-server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories:
- LSP

source:
id: pkg:github/forcedotcom/salesforcedx-vscode@v60.12.0
id: pkg:github/forcedotcom/salesforcedx-vscode@v60.15.0
asset:
file: salesforcedx-vscode-apex-{{ version | strip_prefix "v" }}.vsix

Expand Down
2 changes: 1 addition & 1 deletion packages/ast-grep/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ categories:
- LSP

source:
id: pkg:npm/%40ast-grep/[email protected].0
id: pkg:npm/%40ast-grep/[email protected].6

bin:
ast-grep: npm:ast-grep
Expand Down
3 changes: 2 additions & 1 deletion packages/astro-language-server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ categories:
- LSP

source:
id: pkg:npm/%40astrojs/language-server@2.9.0
id: pkg:npm/%40astrojs/language-server@2.10.0
extra_packages:
- typescript
- "@astrojs/ts-plugin"

schemas:
lsp: vscode:https://raw.githubusercontent.com/withastro/language-tools/@astrojs/language-server@{{version}}/packages/vscode/package.json
Expand Down
2 changes: 1 addition & 1 deletion packages/autopep8/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- Formatter

source:
id: pkg:pypi/autopep8@2.1.0
id: pkg:pypi/autopep8@2.2.0

bin:
autopep8: pypi:autopep8
6 changes: 1 addition & 5 deletions packages/autotools-language-server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ categories:
- LSP

source:
id: pkg:pypi/[email protected].18
id: pkg:pypi/[email protected].19

bin:
autotools-language-server: pypi:autotools-language-server

ci_skip:
# Due to version not found issue
- win_x64
2 changes: 1 addition & 1 deletion packages/basedpyright/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- LSP

source:
id: pkg:pypi/[email protected].1
id: pkg:pypi/[email protected].5

schemas:
lsp: vscode:https://raw.githubusercontent.com/DetachHead/basedpyright/v{{version}}/packages/vscode-pyright/package.json
Expand Down
2 changes: 1 addition & 1 deletion packages/bash-language-server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- LSP

source:
id: pkg:npm/bash-language-server@5.2.0
id: pkg:npm/bash-language-server@5.3.4

schemas:
lsp: vscode:https://raw.githubusercontent.com/bash-lsp/bash-language-server/server-{{version}}/vscode-client/package.json
Expand Down
2 changes: 1 addition & 1 deletion packages/bicep-lsp/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- LSP

source:
id: pkg:github/Azure/bicep@v0.27.1
id: pkg:github/Azure/bicep@v0.28.1
asset:
file: vscode-bicep.vsix

Expand Down
2 changes: 1 addition & 1 deletion packages/biome/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories:
- Formatter

source:
id: pkg:npm/@biomejs/biome@1.7.3
id: pkg:npm/@biomejs/biome@1.8.0

schemas:
lsp: vscode:https://raw.githubusercontent.com/biomejs/biome-vscode/main/package.json
Expand Down
2 changes: 1 addition & 1 deletion packages/brighterscript-formatter/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories:
- Formatter

source:
id: pkg:npm/[email protected].1
id: pkg:npm/[email protected].3

bin:
bsfmt: npm:bsfmt
2 changes: 1 addition & 1 deletion packages/brighterscript/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories:
- LSP

source:
id: pkg:npm/brighterscript@0.65.27
id: pkg:npm/brighterscript@0.67.2

bin:
bsc: npm:bsc
Loading

0 comments on commit ec49b37

Please sign in to comment.