Strip the sourcemap comment from the preload script #297
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: CI | |
on: push | |
jobs: | |
build: | |
name: Build & test | |
strategy: | |
matrix: | |
include: | |
- platform: linux | |
os: "ubuntu-20.04" | |
- platform: windows | |
os: "windows-2019" | |
- platform: mac | |
os: "macos-11" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.8.0 | |
check-latest: true | |
cache: 'npm' | |
# Due to https://github.com/nodejs/node-gyp/issues/2869, node-gyp fails | |
# in latest GH runners, due to Python 3.12 incompatibility: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- run: npm ci | |
- run: npm run build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
CSC_LINK: ${{ secrets.CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} | |
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.platform }}-distributables | |
path: dist/HttpToolkit-* | |
if-no-files-found: error | |
publish: | |
name: Publish a release | |
runs-on: "ubuntu-20.04" | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
needs: build | |
steps: | |
- name: Get all distributables | |
uses: actions/download-artifact@v3 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
prerelease: true | |
- name: Upload Release Assets | |
id: upload-release-assets | |
uses: dwenegar/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} | |
assets_path: ./*/ |