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

Switch to github workflows. #452

Merged
merged 1 commit into from
Mar 27, 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
34 changes: 34 additions & 0 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Pre-Release Extension

on:
push:
branches:
- main

jobs:
test:
uses: './.github/workflows/test.yaml'

vsix-release:
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Publish
run: |
npm ci --loglevel error
npm run publish-extensions prerelease
env:
CI: true
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}
GA_API_SECRET: ${{ secrets.GA_API_SECRET }}
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
GHAPI_PAT: ${{ secrets.GHAPI_PAT }}
31 changes: 31 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Release Extension

on: [workflow_dispatch]

jobs:
test:
uses: './.github/workflows/test.yaml'

vsix-release:
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Publish
run: |
npm ci --loglevel error
npm run publish-extensions patch
env:
CI: true
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}
GA_API_SECRET: ${{ secrets.GA_API_SECRET }}
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
GHAPI_PAT: ${{ secrets.GHAPI_PAT }}
37 changes: 37 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test

on: [pull_request, workflow_call]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install and test
run: |
npm ci --loglevel error
npm run build
npm run test
- name: Start dbus
run: |
sudo service dbus start
export XDG_RUNTIME_DIR=/tmp/xdg_runtime
mkdir $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR
chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> "$GITHUB_ENV"
dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &
- name: Run integration test
uses: coactions/setup-xvfb@v1
with:
run: npm run integration
env:
CI: true
Loading