diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..01ca718 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,33 @@ +name: "Publish" + +on: + release: + types: [published] + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - name: "Checkout the repository" + uses: actions/checkout@v4 + + - name: "Get addon information and update build args" + id: information + uses: ./.github/actions/addon-info + + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: "Publish" + uses: home-assistant/builder@master + with: + args: | + --all \ + --target rclone_backup \ + --image ${{ steps.information.outputs.image }} \ + --docker-hub ${{ steps.information.outputs.repository }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..6dcd1d4 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,46 @@ +name: "Release" + +on: + push: + branches: + - "beta" + - "alpha" + workflow_dispatch: + inputs: + draft: + type: boolean + description: "Draft release" + default: false + release_type: + type: choice + description: "Release type" + default: "auto" + options: + - "auto" + - "patch" + - "minor" + - "major" + +jobs: + publish: + name: "Publish" + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: "Checkout the repository" + uses: actions/checkout@v4 + + - name: "Setup node" + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: "Release Package 📦" + run: corepack enable && pnpm dlx @jcwillox/semantic-release-config + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEMANTIC_RELEASE_GITHUB_DRAFT: ${{ inputs.draft }} + SEMANTIC_RELEASE_FORCE_RELEASE: ${{ inputs.release_type }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 7729c0c..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: "Publish" - -on: - release: - types: [published] - -env: - TARGET: rclone_backup - -jobs: - publish: - name: Publish - runs-on: ubuntu-latest - steps: - - name: "Checkout the repository" - uses: actions/checkout@v4 - with: - ref: main - - - name: "Update version and changelog" - run: | - yq -i '.version = "${{ github.event.release.tag_name }}"' $TARGET/config.yaml - - echo -e "## What’s changed\n" > $TARGET/CHANGELOG.md - jq --raw-output '.release.body // empty' "${{ github.event_path }}" >> $TARGET/CHANGELOG.md - - - name: "Commit & push changes" - run: | - git config user.name github-actions - git config user.email github-actions@github.com - git add . - git commit -m "🎉 Release ${{ github.event.release.tag_name }}" - git push - - - name: "Get addon information and update build args" - id: information - uses: ./.github/actions/addon-info - - - name: "Login to GitHub Container Registry" - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: "Publish" - uses: home-assistant/builder@master - with: - args: | - --all \ - --target ${{ env.TARGET }} \ - --image ${{ steps.information.outputs.image }} \ - --docker-hub ${{ steps.information.outputs.repository }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yaml similarity index 100% rename from .github/workflows/test.yml rename to .github/workflows/test.yaml diff --git a/rclone_backup/CHANGELOG.md b/rclone_backup/CHANGELOG.md deleted file mode 100644 index f1cdb54..0000000 --- a/rclone_backup/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -## What’s changed - -## What's Changed - -* build(deps): update actions/checkout action to v4 by @renovate in https://github.com/jcwillox/hassio-rclone-backup/pull/62 -* build(deps): update docker/login-action action to v3 by @renovate in https://github.com/jcwillox/hassio-rclone-backup/pull/63 -* build(deps): update all non-major dependencies by @renovate in https://github.com/jcwillox/hassio-rclone-backup/pull/61 - * updated to `rclone` to `v1.66.0` -* build(deps): update module github.com/go-co-op/gocron to v2 by @renovate in https://github.com/jcwillox/hassio-rclone-backup/pull/64 -* build(deps): update go.mod version to 1.22 (dd73c29) -* ci: add renovate config (2bb7d50) - -**Full Changelog**: https://github.com/jcwillox/hassio-rclone-backup/compare/3.1.0...3.2.0