aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2021-12-16 14:03:27 -0500
committerMax Isom <[email protected]>2021-12-16 14:03:27 -0500
commitf6376048eb27e7e2f5c5305f931b23a2d026bbd8 (patch)
tree1adea4b8890cfafd24b58a9bcfb47e9ac2f64f69
parentea6367ccdc1e62da8e83c5e0be02328d5b23f8dd (diff)
downloadmuse-f6376048eb27e7e2f5c5305f931b23a2d026bbd8.tar.xz
muse-f6376048eb27e7e2f5c5305f931b23a2d026bbd8.zip
Add changelog, generate releases
-rw-r--r--.github/workflows/publish-image.yml52
-rw-r--r--.github/workflows/publish.yml91
-rw-r--r--CHANGELOG.md14
3 files changed, 105 insertions, 52 deletions
diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml
deleted file mode 100644
index ea41dd0..0000000
--- a/.github/workflows/publish-image.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Publish Docker image
-
-on:
- push:
- branches: master
-
-jobs:
- main:
- runs-on: ubuntu-latest
- steps:
- - name: Set up Buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
-
- - name: Cache Docker layers
- uses: actions/cache@v2
- with:
- path: /tmp/.buildx-cache
- key: ${{ runner.os }}-buildx-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-buildx-
-
- - name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- - name: Limit concurrent builds to 1
- uses: softprops/turnstyle@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Build and push
- id: docker_build
- uses: docker/build-push-action@v2
- with:
- push: true
- tags: codetheweb/muse:latest
- platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
-
- - name: Update Docker Hub description
- uses: peter-evans/[email protected]
- env:
- DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
- DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
- DOCKERHUB_REPOSITORY: codetheweb/muse
- \ No newline at end of file
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..51339b2
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,91 @@
+name: Publish Docker image
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Get version from tag
+ id: tag_name
+ run: |
+ echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
+ shell: bash
+
+ - name: Get Changelog Entry
+ id: changelog_reader
+ uses: mindsers/changelog-reader-action@v2
+ with:
+ validation_depth: 10
+ version: ${{ steps.tag_name.outputs.current_version }}
+ path: ./CHANGELOG.md
+
+ - name: Create/update release
+ uses: ncipollo/release-action@v1
+ with:
+ tag: ${{ steps.changelog_reader.outputs.version }}
+ name: Release ${{ steps.changelog_reader.outputs.version }}
+ body: ${{ steps.changelog_reader.outputs.changes }}
+ prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
+ draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
+ allowUpdates: true
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up Buildx
+ uses: docker/setup-buildx-action@v1
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: Cache Docker layers
+ uses: actions/cache@v2
+ with:
+ path: /tmp/.buildx-cache
+ key: ${{ runner.os }}-buildx-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-buildx-
+
+ - name: Login to DockerHub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Get tags
+ id: get-tags
+ uses: Surgo/docker-smart-tag-action@v1
+ with:
+ docker_image: codetheweb/muse
+
+ - name: Wait on lint & build
+ uses: lewagon/[email protected]
+ with:
+ ref: ${{ github.sha }}
+ check-name: 'Lint & build'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ wait-interval: 10
+
+ - name: Build and push
+ id: docker_build
+ uses: docker/build-push-action@v2
+ with:
+ push: true
+ tags: ${{ steps.get-tags.outputs.tag }}
+ platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
+ cache-from: type=local,src=/tmp/.buildx-cache
+ cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
+
+ - name: Update Docker Hub description
+ uses: peter-evans/[email protected]
+ env:
+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
+ DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
+ DOCKERHUB_REPOSITORY: codetheweb/muse
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..d6e9487
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,14 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [0.1.0]
+### Added
+- Initial release
+
+[Unreleased]: https://github.com/codetheweb/muse/compare/v0.1.0...HEAD
+[0.1.0]: https://github.com/codetheweb/muse/releases/tag/v0.1.0