0.0.39 #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- ci-debug | |
- release | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] # , windows-latest] Failing for unknown reason and we don't really test Windows anyway... | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
# --- fzf, rg, bat --- | |
- name: Install FZF, ripgrep, bat | |
run: src/test/install_deps.sh | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
# --- deps --- | |
- name: NPM install | |
run: npm install | |
# --- build / test --- | |
- name: Test | |
run: xvfb-run -a npm test | |
if: runner.os == 'Linux' | |
- name: Test | |
run: npm test | |
if: runner.os != 'Linux' | |
# --- package --- | |
- name: Package | |
run: npm run vscode:package | |
if: runner.os == 'Linux' | |
# - uses: actions/upload-artifact@v2 | |
# if: runner.os == 'Linux' | |
# with: | |
# name: find-it-faster-vsix | |
# path: "*.vsix" | |
# Unfortunately, this is very redundant. | |
# Unless I can just push the vsix file that I built earlier, there's | |
# no way around it, it seems. | |
publish: | |
if: github.ref == 'refs/heads/release' | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
# --- fzf, rg, bat --- | |
- name: Install FZF, ripgrep, bat | |
run: src/test/install_deps.sh | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
# --- npm deps --- | |
- name: NPM install | |
run: npm install | |
# --- publish --- | |
- name: Publish! | |
env: | |
VSCE_PAT: ${{ secrets.FIND_IT_FASTER_AZURE_PAT }} | |
OPENVSX_TOKEN: ${{ secrets.FIND_IT_FASTER_OPENVSX_TOKEN }} | |
run: | | |
sudo apt-get install -y jq | |
FIF_TAG=$(cat package.json | jq -r .version) | |
npm run vscode:publish | |
echo "Tagging release with $FIF_TAG..." | |
git tag "$FIF_TAG" | |
git push origin "$FIF_TAG" | |
# Publish to openvsx | |
npx ovsx publish -p "$OPENVSX_TOKEN" |