Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.7.0 #11

Merged
merged 11 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['22.x']
outputs:
artifact-url: ${{ steps.upload-artifact.outputs.artifact-url }}
commit-hash: ${{ steps.get-version.outputs.commitHash }}
extension-version: ${{ steps.get-version.outputs.extensionVersion }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Get Extension Version
id: get-version
shell: bash
run: |
extensionVersion=$(node -p "require('./package.json').version")
echo "extensionVersion=$extensionVersion" >> $GITHUB_ENV
echo "extensionVersion=$extensionVersion" >> $GITHUB_OUTPUT
echo "commitHash=$(git log --format="%H" | head -n 1)" >> $GITHUB_OUTPUT

- name: Package VS Code extension
id: package
uses: nhedger/package-vscode-extension@main

- name: Upload artifact
uses: actions/upload-artifact@v4
id: upload-artifact
with:
name: soberjs-vscode-${{ env.extensionVersion }}.vsix
path: /home/runner/work/soberjs-vscode/soberjs-vscode/soberjs-vscode-${{ env.extensionVersion }}.vsix
compression-level: 0
if-no-files-found: error
10 changes: 10 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: CI

on:
push:
pull_request:

jobs:
build:
name: Build
uses: ./.github/workflows/Build.yaml
52 changes: 0 additions & 52 deletions .github/workflows/CI.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/Publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish

on:
workflow_dispatch:
inputs:
prerelease:
description: 'Pre-release'
type: boolean
required: false
default: false
dry_run_marketplace:
description: 'Dry Run (Marketplace) (Do not publish)'
type: boolean
required: false
default: false
dry_run_gh_releases:
description: 'Dry Run (GitHub Releases) (Do not publish)'
type: boolean
required: false
default: false

jobs:
build:
name: Build
uses: ./.github/workflows/Build.yaml
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
shell: bash
run: |
curl -o extension.zip '${{ needs.build.outputs.artifact-url }}'
echo
unzip extension.zip
echo "extensionFileName=soberjs-vscode-${{ needs.build.outputs.extension-version }}.vsix >> $GITUHB_ENV"
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ ! inputs.prerelease }}
with:
pat: ${{ secrets.AZURE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ./${{ env.extensionFileName }}
dryRun: ${{ inputs.dry_run_marketplace }}
- name: Publish to GitHub Releases
uses: softprops/action-gh-release@v2
if: ${{ ! inputs.dry_run_gh_releases }}
with:
files: ./${{ env.extensionFileName }}
tag_name: v${{ needs.build.outputs.extension-version }}
prerelease: ${{ inputs.prerelease }}
target_commitish: ${{ needs.build.outputs.commit-hash }}
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"singleQuote": true,
"tabWidth": 4,
"overrides": [
{
"files": ["*.yaml", "*.yml", "*.json", "*.html", "*.md"],
"options": {
"tabWidth": 2
}
}
]
}
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ out/**
docs/**
.gitignore
.gitattributes
.prettierrc
CONTRIBUTING.md
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# 版本记录

## v0.7.0

- 针对 [Sober `0.4.1`](https://soberjs.com/introduction/update-log) 的全面更新
- 增加 Field 组件
- 增加 Menu 组件
- 补充了 Popup Menu Item 组件
- 更新工作流
- 增加了 Field、Text Field、Picker、Checkbox、Radio Button 的 CSS 变量支持

## v0.6.0

- 适配 [Sober `0.3.0` 更新](https://soberjs.com/introduction/update-log)
Expand Down
Loading
Loading