diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-01-03 14:39:02 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-01-03 14:39:02 -0600 |
| commit | 8d571b31b131a7ddcdff1fdd63986cc4a0c2a985 (patch) | |
| tree | 88df76c8e5b1ceeea2e20701cc8c04a30351f002 | |
| parent | 96a3dd4e0d223edbb0bd06005d1218f5e57404d5 (diff) | |
| download | slskd-8d571b31b131a7ddcdff1fdd63986cc4a0c2a985.tar.gz | |
combine workflows
| -rw-r--r-- | .github/workflows/ci.yml | 52 | ||||
| -rw-r--r-- | .github/workflows/publish.yml | 57 |
2 files changed, 69 insertions, 40 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 664b2fb1..c2402d01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,30 +1,52 @@ -# This is a basic workflow to help you get started with Actions - name: CI - -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ master ] pull_request: branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on + name: Build and Test runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + - name: Build + run: ./bin/build + - name: Upload Static Web Content + uses: actions/upload-artifact@v2 + with: + name: web + path: src/slskd/wwwroot + publish: + name: Publish Build Artifacts + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/heads/master' + strategy: + matrix: + runtime: ["win-x64", "linux-x64", "linux-musl-x64", "linux-arm64", "osx-x64"] + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + with: + name: web + path: src/slskd/wwwroot + - name: Publish ${{ matrix.runtime }} + run: bin/publish --no-web-build --runtime ${{ matrix.runtime }} - # Runs a single command using the runners shell + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.runtime }} + path: dist/${{ matrix.runtime }} + docker: + name: Build Docker Image + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 - name: Build - run: ./bin/build
\ No newline at end of file + run: docker build -t slskd/slskd:${{ github.sha }} .
\ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f32a408d..135a9bf4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,31 +1,38 @@ -# This is a basic workflow to help you get started with Actions +# # This is a basic workflow to help you get started with Actions -name: Publish +# name: Publish -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] +# # Controls when the action will run. +# on: +# # Triggers the workflow on push or pull request events but only for the master branch +# push: +# branches: [ master ] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: +# # Allows you to run this workflow manually from the Actions tab +# workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - publish: - runs-on: ubuntu-latest - strategy: - matrix: - runtime: ["win-x64", "linux-x64"] - steps: - - uses: actions/checkout@v2 - - name: Publish ${{ matrix.runtime }} - run: bin/publish --runtime ${{ matrix.runtime }} +# # A workflow run is made up of one or more jobs that can run sequentially or in parallel +# jobs: +# web: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - name: Build Static Web Content +# run: bin/build --web-only +# publish: +# runs-on: ubuntu-latest +# needs: web +# strategy: +# matrix: +# runtime: ["win-x64", "linux-x64", "linux-musl-x64", "linux-arm64", "osx-x64"] +# steps: +# - uses: actions/checkout@v2 +# - name: Publish ${{ matrix.runtime }} +# run: bin/publish --runtime ${{ matrix.runtime }} - - name: Upload a Build Artifact - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.runtime }} - path: dist/${{ matrix.runtime }} +# - name: Upload a Build Artifact +# uses: actions/upload-artifact@v2 +# with: +# name: ${{ matrix.runtime }} +# path: dist/${{ matrix.runtime }} |
