diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 811a619f..2f05b036 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,6 @@ jobs: run: | npm install npm run compile - npm run build - name: Upload Artifact uses: actions/upload-artifact@v3 @@ -44,25 +43,6 @@ jobs: path: ~/.npm/_logs/* retention-days: 14 - build-debs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: jtdor/build-deb-action@v1 - env: - DEB_BUILD_OPTIONS: noautodbgsym - with: - buildpackage-opts: --build=binary --no-sign - extra-build-deps: git - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: true - files: | - LICENSE - bin/* - debian/artifacts/*.deb - test: name: Test runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..c5673fab --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +on: + push: + tags: + - 'v*' + +jobs: + build-debs: + runs-on: ubuntu-latest + steps: + - name: Set up Javascript/Node + uses: actions/setup-node@v4 + with: + node-version: 18.19.0 + + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: '0' + + - name: Cache multiple paths + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Build + run: | + npm install + npm run build + + - uses: jtdor/build-deb-action@v1 + env: + DEB_BUILD_OPTIONS: noautodbgsym + with: + buildpackage-opts: --build=binary --no-sign + extra-build-deps: git + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: true + files: | + LICENSE + bin/* + debian/artifacts/*.deb