Skip to content

Commit

Permalink
ci: 1
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolLoong committed Nov 8, 2024
1 parent 1618793 commit d248bc2
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 105 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const commitMessage = process.env.GITHUB_EVENT_HEAD_COMMIT_MESSAGE;
const target = process.env.TARGET;

const execSync = require('child_process').execSync;

console.log("GITHUB_EVENT_HEAD_COMMIT_MESSAGE = " + commitMessage);
if (commitMessage.includes('-pre')) {
execSync('npx vsce package --pre-release --target ' + target, { stdio: 'inherit' });
execSync('npx vsce package --pre-release --target ' + target + ' --no-dependencies', { stdio: 'inherit' });
} else {
execSync('npx vsce package --target ' + target, { stdio: 'inherit' });
execSync('npx vsce package --target ' + target + ' --no-dependencies', { stdio: 'inherit' });
}
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: success() && startsWith( github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
- run: |
if [[ "${{ github.event.head_commit.message }}" == *"-pre"* ]]; then
npx vsce publish --pre-release --packagePath $(find . -iname *.vsix)
else
npx vsce publish --packagePath $(find . -iname *.vsix)
fi
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
# steps:
# - uses: actions/download-artifact@v4
# - run: |
# if [[ "${{ github.event.head_commit.message }}" == *"-pre"* ]]; then
# npx vsce publish --pre-release --packagePath $(find . -iname *.vsix)
# else
# npx vsce publish --packagePath $(find . -iname *.vsix)
# fi
# env:
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
Loading

0 comments on commit d248bc2

Please sign in to comment.