From e61e8b8ccd9e9776bdb7a12680e4b4a1b3e8f7d2 Mon Sep 17 00:00:00 2001 From: Mick Amadio <01micko@gmail.com> Date: Sat, 31 Jul 2021 21:10:28 +0000 Subject: [PATCH 1/6] Add workflow Create a package and upload --- .github/workflows/blank.yml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..cb8d186 --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,50 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow 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 + 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 + + # Runs a single command using the runners shell + - name: Build + run: ./puppy.sh + - 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: v${{ github.run_number }} + release_name: v${{ github.run_number }} + draft: false + prerelease: false + - 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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./puppy_flat_icons.tar.xz + asset_name: puppy_flat_icons.tar.xz + asset_content_type: application/x-xz-compressed-tar From 0cabc423a0e5f25e9f9628487582b76656f47baf Mon Sep 17 00:00:00 2001 From: Mick Amadio <01micko@gmail.com> Date: Sat, 31 Jul 2021 21:18:17 +0000 Subject: [PATCH 2/6] Rename blank.yml to release.yml --- .github/workflows/{blank.yml => release.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{blank.yml => release.yml} (100%) diff --git a/.github/workflows/blank.yml b/.github/workflows/release.yml similarity index 100% rename from .github/workflows/blank.yml rename to .github/workflows/release.yml From 7dcf5ccf57542626a7a2b39f5201ce67868f0f1a Mon Sep 17 00:00:00 2001 From: 01micko <01micko@gmail.com> Date: Sun, 1 Aug 2021 07:20:12 +1000 Subject: [PATCH 3/6] fix build.conf --- build.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.conf b/build.conf index 20645ba..e0f0348 100644 --- a/build.conf +++ b/build.conf @@ -2,8 +2,7 @@ NAME="Puppy Flat" COMMENT="A GTK Icon Theme by zigbert, technosaurus and 01micko" VIEWBOX="0 0 100 100" THEME=${NAME} -PKG=${THEME/ /_} -PKG=${PKG,,}_icons +PKG=puppy_flat_icons VER=0.10 # comment if using another distro PUPPY=true From 82a5dce174018dc7b089e5f64d36822a60a1ec20 Mon Sep 17 00:00:00 2001 From: 01micko <01micko@gmail.com> Date: Sun, 1 Aug 2021 09:58:47 +1000 Subject: [PATCH 4/6] fix pet.specs and add checksum --- Makefile | 2 +- build_tar.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ae4f56d..f796ca2 100644 --- a/Makefile +++ b/Makefile @@ -15,5 +15,5 @@ install: clean: -rm -rf "$(THEME)" - -rm -f *.tar.xz + -rm -f *.tar.xz* -rm -rf *_icons diff --git a/build_tar.sh b/build_tar.sh index bc7bf6e..f194be7 100755 --- a/build_tar.sh +++ b/build_tar.sh @@ -5,7 +5,7 @@ add_specs() { # eg: pmaterial_icons-0.2|pmaterial_icons|0.2||BuildingBlock|12420K||pmaterial_icons-0.2.pet||icons for puppy loosely based on material design|||| SIZE=$(du -k -d 0 $1 | awk '{print $1}') cat > ${1}/pet.specs < ${PKG}.tar.xz.sha256.txt echo 'Done!' From c03f9bedac2f60c2c19b3c6ed6396beb79b08f6d Mon Sep 17 00:00:00 2001 From: Mick Amadio <01micko@gmail.com> Date: Sun, 1 Aug 2021 00:02:48 +0000 Subject: [PATCH 5/6] add sha256sum --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb8d186..05c645d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,3 +48,13 @@ jobs: asset_path: ./puppy_flat_icons.tar.xz asset_name: puppy_flat_icons.tar.xz asset_content_type: application/x-xz-compressed-tar + - name: Upload Release Asset 1 + id: upload-release-asset-1 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./puppy_flat_icons.tar.xz.sha256.txt + asset_name: puppy_flat_icons.tar.xz.sha256.txt + asset_content_type: text/plain From 479fa6b22abdb431c2053f88fff7f220c5fc551d Mon Sep 17 00:00:00 2001 From: Mick Amadio <01micko@gmail.com> Date: Sun, 1 Aug 2021 16:47:29 +1000 Subject: [PATCH 6/6] Update release.yml add condition sp PR event doesn't trigger release --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05c645d..29a4bb9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,7 @@ jobs: - name: Build run: ./puppy.sh - name: Create Release + if: github.event_name == 'push' && github.ref == 'refs/heads/master' id: create_release uses: actions/create-release@v1 env: @@ -39,6 +40,7 @@ jobs: draft: false prerelease: false - name: Upload Release Asset + if: github.event_name == 'push' && github.ref == 'refs/heads/master' id: upload-release-asset uses: actions/upload-release-asset@v1 env: @@ -49,6 +51,7 @@ jobs: asset_name: puppy_flat_icons.tar.xz asset_content_type: application/x-xz-compressed-tar - name: Upload Release Asset 1 + if: github.event_name == 'push' && github.ref == 'refs/heads/master' id: upload-release-asset-1 uses: actions/upload-release-asset@v1 env: