Try publishing a release

This commit is contained in:
Jamil Bou Kheir
2021-07-09 09:13:02 -07:00
parent f9002ce943
commit 77fe9056be

View File

@@ -140,7 +140,7 @@ jobs:
- run: .ci/build_deb.sh
- uses: actions/upload-artifact@v2
with:
name: deb
name: cloudfire_${{ matrix.os }}_${{ matrix.arch }}
path: cloudfire_${{ matrix.os }}_${{ matrix.arch }}.deb
functional-test:
@@ -179,7 +179,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: deb
name: cloudfire_${{ matrix.os }}_${{ matrix.arch }}
path: ./
- run: |
ls -lR cloudfire*
@@ -188,35 +188,39 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: .ci/functional_test.sh
#
# publish:
# needs: functional-test
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-20.04]
# if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
# steps:
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: true
# - uses: actions/download-artifact@v2
# with:
# name: cloudfire-deb
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./cloudfire_${{ github.sha }}-1_${{ matrix.os }}_amd64.deb
# asset_name: cloudfire_${{ matrix.os }}_amd64.deb
# asset_content_type: application/vnd.debian.binary-package
publish-deb:
needs: functional-test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- arch: amd64
# - arch: arm64
os: [ubuntu-18.04, ubuntu-20.04]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true
- uses: actions/download-artifact@v2
with:
name: cloudfire_${{ matrix.os }}_${{ matrix.arch }}
path: ./
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cloudfire_${{ matrix.os }}_${{ matrix.arch }}.deb
asset_name: ${{ matrix.os }}_${{ matrix.arch }}
asset_content_type: application/vnd.debian.binary-package