CD #2
Workflow file for this run
This file contains hidden or 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: CD | |
| on: | |
| # 输入version | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'version number' | |
| required: true | |
| default: '0.1.0' | |
| jobs: | |
| build_and_push: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: coursier/cache-action@v6 | |
| - uses: coursier/setup-action@v1 | |
| with: | |
| jvm: temurin:21 | |
| apps: sbt bloop sbtn | |
| - name: Run SBT stage | |
| run: sbt clean stage | |
| - name: package | |
| run: jpackage --name https-proxy --input target/universal/stage/lib --main-jar https-proxy.https-proxy-${{ inputs.version }}.jar --main-class Main --type app-image | |
| - name: release | |
| # 上传 https-proxy 目录 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: https-proxy-${{ matrix.os }}-${{ inputs.version }} | |
| path: https-proxy | |