Skip to content

Commit

Permalink
ci: update ci.yml and release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
matteomorlack committed Aug 3, 2024
1 parent 73e73b8 commit d79a904
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 39 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm install
- run: xvfb-run -a npm test
- name: Install deps
run: npm ci
- name: Run Tests
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
- name: Run Tests
run: npm test
if: runner.os != 'Linux'
71 changes: 35 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,41 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
- run: xvfb-run -a npm test
- name: Install deps
run: npm ci
- name: Run Tests
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
- name: Run Tests
run: npm test
if: runner.os != 'Linux'
- run: |
git status -s
- name: Package
if: success() && matrix.os == 'ubuntu-latest'
# - 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() && 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 }}
run: |
npm run package ${RELEASE_TYPE}
echo "packageFile=$(ls *.vsix)" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ inputs.releaseType }}
- name: Publish
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 }}

0 comments on commit d79a904

Please sign in to comment.