|
| 1 | +name: Create sysdig-inspect draft/RC release |
| 2 | +on: |
| 3 | + push: |
| 4 | + tags: |
| 5 | + - '[0-9]+.[0-9]+.[0-9]+' |
| 6 | + - '[0-9]+.[0-9]+.[0-9]+-[a-z]+' |
| 7 | + - '[0-9]+.[0-9]+.[0-9]+-[a-z]+[0-9]+' |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-sysdig-inspect: |
| 13 | + env: |
| 14 | + BUILDER: "sysdiglabs/sysdig-inspect-builder:0.2" |
| 15 | + VERSION: ${{ github.ref_name }} |
| 16 | + |
| 17 | + runs-on: ubuntu-latest |
| 18 | + container: |
| 19 | + image: "sysdiglabs/sysdig-inspect-builder:0.2" |
| 20 | + env: |
| 21 | + INSTALL_DEPS: true |
| 22 | + GIT_BRANCH: ${{ github.ref_name }} |
| 23 | + VERSION: ${{ github.ref_name }} |
| 24 | + BUILD_MAC: true |
| 25 | + volumes: |
| 26 | + - /var/run/docker.sock:/var/run/docker.sock |
| 27 | + steps: |
| 28 | + - name: Checkout Sysdig |
| 29 | + uses: actions/checkout@v3 |
| 30 | + - name: install 7z |
| 31 | + run: | |
| 32 | + cd /tmp |
| 33 | + sed -i '/^mozilla\/DST_Root_CA_X3/s/^/!/' /etc/ca-certificates.conf && |
| 34 | + update-ca-certificates -f && |
| 35 | + curl -L -o 7z.tar.xz https://www.7-zip.org/a/7z2301-linux-x64.tar.xz && |
| 36 | + tar -xaf 7z.tar.xz && |
| 37 | + mv 7zz /usr/bin/7z && |
| 38 | + rm -vfr /tmp/* && |
| 39 | + cd - |
| 40 | + - name: Build sysdig-inspect |
| 41 | + run: ./build/build.sh |
| 42 | + - name: Upload artifacts rpm |
| 43 | + uses: actions/upload-artifact@v3 |
| 44 | + with: |
| 45 | + name: sysdig-inspect-release-${{ env.VERSION }}-linux-x86_64.rpm |
| 46 | + path: | |
| 47 | + out/linux/installers/sysdig-inspect-linux-x86_64.rpm |
| 48 | + - name: Upload artifacts deb |
| 49 | + uses: actions/upload-artifact@v3 |
| 50 | + with: |
| 51 | + name: sysdig-inspect-release-${{ env.VERSION }}-linux-x86_64.deb |
| 52 | + path: | |
| 53 | + out/linux/installers/sysdig-inspect-linux-x86_64.deb |
| 54 | + - name: Upload artifacts dmg |
| 55 | + uses: actions/upload-artifact@v3 |
| 56 | + with: |
| 57 | + name: sysdig-inspect-release-${{ env.VERSION }}-mac-x86_64.dmg |
| 58 | + path: | |
| 59 | + out/mac/binaries/sysdig-inspect-${{ env.VERSION }}-mac-x86_64.dmg |
| 60 | + - name: Upload artifacts zip |
| 61 | + uses: actions/upload-artifact@v3 |
| 62 | + with: |
| 63 | + name: sysdig-inspect-release-${{ env.VERSION }}-mac-x86_64.zip |
| 64 | + path: | |
| 65 | + out/mac/binaries/sysdig-inspect-mac-x86_64.zip |
| 66 | +
|
| 67 | + create-draft-release: |
| 68 | + runs-on: ubuntu-latest |
| 69 | + needs: [build-sysdig-inspect] |
| 70 | + env: |
| 71 | + VERSION: ${{ github.ref_name }} |
| 72 | + steps: |
| 73 | + - name: Download artifacts (linux-amd64 deb) |
| 74 | + uses: actions/download-artifact@v3 |
| 75 | + with: |
| 76 | + name: sysdig-inspect-release-${{ env.VERSION }}-linux-x86_64.deb |
| 77 | + - name: Download artifacts (linux-amd64 rpm) |
| 78 | + uses: actions/download-artifact@v3 |
| 79 | + with: |
| 80 | + name: sysdig-inspect-release-${{ env.VERSION }}-linux-x86_64.rpm |
| 81 | + - name: Download artifacts (osx-amd64) |
| 82 | + uses: actions/download-artifact@v3 |
| 83 | + with: |
| 84 | + name: sysdig-inspect-release-${{ env.VERSION }}-mac-x86_64.zip |
| 85 | + - name: test |
| 86 | + run: ls -lah /home/runner/work/sysdig-inspect/sysdig-inspect/ |
| 87 | + - name: Create draft release |
| 88 | + uses: softprops/action-gh-release@v1 |
| 89 | + with: |
| 90 | + files: | |
| 91 | + sysdig-inspect-linux* |
| 92 | + sysdig-inspect-mac* |
| 93 | + sysdig-inspect-win* |
| 94 | + draft: true |
| 95 | + generate_release_notes: true |
0 commit comments