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

update release.yml, LICENSE and package.json #4

Merged
merged 1 commit into from
Aug 2, 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
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI
on:
- pull_request
- push

jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm install
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
41 changes: 36 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
on:
# push:
# branches:
# - main
workflow_dispatch:
inputs:
releaseType:
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch

jobs:
test:
Expand All @@ -22,8 +28,33 @@ jobs:
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- name: Package
if: success() && matrix.os == 'ubuntu-latest'
run: |
npm run package ${RELEASE_TYPE}
echo "packageFile=$(ls *.vsix)" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ inputs.releaseType }}
- name: Publish
if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
run: npm run deploy
if: success() && matrix.os == 'ubuntu-latest'
run: |
npm run publish -i ${VSIX_PATH}
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
VSIX_PATH: ${{ env.packageFile }}
- name: Push tag
if: success() && matrix.os == 'ubuntu-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git push --tags
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
if: success() && matrix.os == 'ubuntu-latest'
with:
files: |
${{ env.packageFile }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "vscode-test",
"deploy": "vsce publish"
"package": "vsce package",
"publish": "vsce publish"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
Expand Down
37 changes: 37 additions & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish
> npm run compile


> [email protected] compile
> tsc -p ./

INFO Files included in the VSIX:
projects-browser-0.1.0.vsix
├─ [Content_Types].xml
├─ extension.vsixmanifest
└─ extension/
├─ CHANGELOG.md [0.24 KB]
├─ LICENSE.txt
├─ README.md [2.54 KB]
├─ package.json [5.97 KB]
├─ test.txt [0.17 KB]
├─ .github/
│ └─ workflows/
│ ├─ ci.yml [0.46 KB]
│ └─ release.yml [0.86 KB]
├─ images/
│ └─ icon.png [22.82 KB]
└─ out/
├─ common.js [2.67 KB]
├─ extension.js [4.87 KB]
├─ filterview.js [1.89 KB]
├─ interfaces.js [0.11 KB]
├─ projectsfavoritesprovider.js [2.17 KB]
├─ projectsprovider.js [2.91 KB]
├─ utils.js [4.52 KB]
└─ test/
└─ extension.test.js [1.61 KB]

DONE Packaged: /home/matteo/coding/projects-browser/projects-browser-0.1.0.vsix (18 files, 21.02 KB)