From ea14cd4239ac821c8275d8b790d77883860a96b6 Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 16 May 2022 12:43:05 -0400 Subject: [PATCH] trying autogenerated release --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++++---- .gitignore | 1 + config.yaml | 2 +- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 54b1a34..7e1acd8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,12 @@ name: Deploy env: MONITORED_FILES: "apparmor.txt build.yaml config.yaml Dockerfile data rootfs" on: - release: - types: [published] + # release: + # types: [published] + on: + push: + paths: + - 'config.yaml' jobs: build: runs-on: ubuntu-latest @@ -15,6 +19,12 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v3 + + - name: Get Version + id: version + shell: bash + run: | + echo ::set-output name=VERSION::$(cat config.yaml | sed -nr 's/version: (.*)/\1/p') - name: Login to DockerHub uses: docker/login-action@v2.0.0 @@ -22,9 +32,21 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: ${{ github.ref }} / ${{ matrix.arch }} + - name: ${{ steps.version.outputs.VERSION }} / ${{ matrix.arch }} uses: home-assistant/builder@2022.03.1 with: args: | --${{ matrix.arch }} \ - --target . \ No newline at end of file + --target . + + - name: Publish Release ${{ steps.version.outputs.VERSION }} + uses: actions/github-script@v6 + env: + VERSION: ${{ steps.version.outputs.VERSION }} + with: + script: | + github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: process.env.VERSION, + }); \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..429b510 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/*.log diff --git a/config.yaml b/config.yaml index 3208229..02291d3 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,5 @@ name: Shortumation -version: 0.1.2b +version: 0.1.3 slug: shortumation image: asosnovsky/shortumation-{arch} url: "https://github.com/asosnovsky/Shortumation"