From 8e92d0691ca7544967c2de84adec7ecc6299ae18 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Nov 2020 00:33:04 +0100 Subject: [PATCH 1/4] Remove unneeded code comments --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58dfdd7..3bd69c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,6 @@ name: Build Packages on: release: types: [published, created, edited] - # Run tests for any PRs -# pull_request: env: SOURCE_DIR: ./ @@ -33,6 +31,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: -# releaseId: 'debian/18.20201012+4' -# releaseId: ${{ needs.create_release.outputs.id }} args: debian/build/release/* From 8f7842acf9fe23b3870ac0ad2d1f11c5e3d6d7bd Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Nov 2020 00:34:50 +0100 Subject: [PATCH 2/4] Rename yaml file --- .../workflows/{release.yml => create_and_upload_artifacts.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{release.yml => create_and_upload_artifacts.yml} (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/create_and_upload_artifacts.yml similarity index 100% rename from .github/workflows/release.yml rename to .github/workflows/create_and_upload_artifacts.yml From e2d7788c6ef29b437bc23570bea93b3bc615bbb1 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Nov 2020 00:35:43 +0100 Subject: [PATCH 3/4] Rename job --- .github/workflows/create_and_upload_artifacts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_and_upload_artifacts.yml b/.github/workflows/create_and_upload_artifacts.yml index 3bd69c8..79bb904 100644 --- a/.github/workflows/create_and_upload_artifacts.yml +++ b/.github/workflows/create_and_upload_artifacts.yml @@ -1,4 +1,4 @@ -name: Build Packages +name: Build and upload packages on: release: From 9dd1253858f92c4ed3f16c3e2966c6076377db5e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Nov 2020 14:01:55 +0100 Subject: [PATCH 4/4] Adding initial release action --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3a93437 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'debian/*' # Push events to matching debian/*, i.e. debian/1.0-2, debian/20.15.10, debian/23.20020326 + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install needed packages + run: | + sudo apt-get update && sudo apt-get install -y dpkg-dev + - name: Gather changelog + run: | + CHANGELOG="$(dpkg-parsechangelog | tail -n +8 > debian/changelog)" + echo "${CHANGELOG}" + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: ${CHANGELOG} + draft: false + prerelease: false