Skip to content

Commit

Permalink
Merge pull request #174 from ember-nexus/github-issue/151
Browse files Browse the repository at this point in the history
GitHub issue/151
  • Loading branch information
Syndesi authored Oct 26, 2023
2 parents d4bc07a + f634c0d commit ee287e2
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 9 deletions.
31 changes: 30 additions & 1 deletion .github/workflows/ci-release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ jobs:
version=$(cat composer.json | jq -r .version)
bumpType=${{ github.event.inputs.release-type }}
newVersion="$(docker run usvc/semver:latest bump $bumpType $version | tr -d '\r')"
newVersionWithoutPatch=$(echo "$GITHUB_ENV" | cut -d'.' -f1,2)
newVersionWithoutMinor=$(echo "$GITHUB_ENV" | cut -d'.' -f1)
jq --arg newVersion "$newVersion" '.version = $newVersion' composer.json | sponge composer.json
echo "New version: $newVersion"
mkdir -p /tmp/ci-env
echo "NEW_VERSION=$newVersion" >> /tmp/ci-env/NEW_VERSION.txt
echo "NEW_VERSION_WITHOUT_PATCH=$newVersionWithoutPatch" >> /tmp/ci-env/NEW_VERSION.txt
echo "NEW_VERSION_WITHOUT_MINOR=$newVersionWithoutMinor" >> /tmp/ci-env/NEW_VERSION.txt
echo "NEW_VERSION=$newVersion" >> $GITHUB_ENV
cat /tmp/ci-env/NEW_VERSION.txt
echo "Update version in command examples within documentation"
find ./docs/commands/assets -type f -exec sed -i "s/$version/$newVersion/g" {} \;
- name: Update changelog unreleased section with new version
uses: superfaceai/release-changelog-action@v2
Expand Down Expand Up @@ -238,7 +245,9 @@ jobs:
- name: Debug version
run: |
echo $NEW_VERSION
echo "${{ env.NEW_VERSION }}"
echo "${{ env.NEW_VERSION_WITHOUT_PATCH }}"
echo "${{ env.NEW_VERSION_WITHOUT_MINOR }}"
# see also https://github.com/Nautilus-Cyberneering/pygithub
- name: Import GPG key
Expand Down Expand Up @@ -289,6 +298,7 @@ jobs:
shell: bash
run: |
ls -la /tmp/docker
docker load < /tmp/docker/api-latest-amd.tar.gz
docker load < /tmp/docker/api-latest-arm.tar.gz
docker tag api:latest-amd embernexus/api:tmp-latest-amd
Expand All @@ -299,16 +309,35 @@ jobs:
docker save embernexus/api:${{ env.NEW_VERSION }}-arm | gzip > /tmp/docker/docker-image-ember-nexus-api-${{ env.NEW_VERSION }}-arm.tar.gz
docker push embernexus/api:tmp-latest-amd
docker push embernexus/api:tmp-latest-arm
echo "Creating and pushing multi arch image embernexus/api:latest"
docker manifest create \
embernexus/api:latest \
--amend embernexus/api:tmp-latest-amd \
--amend embernexus/api:tmp-latest-arm
docker manifest push embernexus/api:latest
echo "Creating and pushing multi arch image embernexus/api:${{ env.NEW_VERSION }}"
docker manifest create \
embernexus/api:${{ env.NEW_VERSION }} \
--amend embernexus/api:tmp-latest-amd \
--amend embernexus/api:tmp-latest-arm
docker manifest push embernexus/api:${{ env.NEW_VERSION }}
echo "Creating and pushing multi arch image embernexus/api:${{ env.NEW_VERSION_WITHOUT_PATCH }}"
docker manifest create \
embernexus/api:${{ env.NEW_VERSION_WITHOUT_PATCH }} \
--amend embernexus/api:tmp-latest-amd \
--amend embernexus/api:tmp-latest-arm
docker manifest push embernexus/api:${{ env.NEW_VERSION_WITHOUT_PATCH }}
echo "Creating and pushing multi arch image embernexus/api:${{ env.NEW_VERSION_WITHOUT_MINOR }}"
docker manifest create \
embernexus/api:${{ env.NEW_VERSION_WITHOUT_MINOR }} \
--amend embernexus/api:tmp-latest-amd \
--amend embernexus/api:tmp-latest-arm
docker manifest push embernexus/api:${{ env.NEW_VERSION_WITHOUT_MINOR }}
echo "Creating temporary JWT key for Docker Hub"
export TMP_DOCKERHUB_JWT_TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.DOCKERHUB_USERNAME}}'", "password": "'${{ secrets.DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
echo "Deleting Docker Hub tag embernexus/api:tmp-latest-amd"
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ 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
### Added
- New releases include two new labels, 'major.minor' and 'major'. Closes #151.
- Release action will now update version string in documentation automatically.

## 0.0.33 - 2023-10-25
### Added
Expand All @@ -23,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improve documentation, closes [#162].
- Elements in endpoint get index are now sorted via the element's id.
- Relations in collection endpoints are sorted by their id as well.
- Upgrade upstream dependency NGINX Unit to 1.31.1.
- Upgrade upstream dependency NGINX Unit to 1.31.1, closes [#171].

### Fixed
- Property normalization is now standardized across endpoints, and uses events. Closes [#166].
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/assets/backup-create.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<span class="highlighted dimgray "></span>
<span class="highlighted dimgray "></span><span class="highlighted dimgray bg-red ">▀ ▀</span><span class="highlighted dimgray "></span> <span class="bold ">Ember Nexus API</span>
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.32, prod mode
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.33, prod mode

<span class="bold ">Backup Create</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/assets/backup-fetch.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<span class="highlighted dimgray "></span>
<span class="highlighted dimgray "></span><span class="highlighted dimgray bg-red ">▀ ▀</span><span class="highlighted dimgray "></span> <span class="bold ">Ember Nexus API</span>
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.32, prod mode
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.33, prod mode

<span class="bold ">Backup Fetch</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/assets/backup-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<span class="highlighted dimgray "></span>
<span class="highlighted dimgray "></span><span class="highlighted dimgray bg-red ">▀ ▀</span><span class="highlighted dimgray "></span> <span class="bold ">Ember Nexus API</span>
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.32, prod mode
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.33, prod mode

<span class="bold ">Backup List</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/assets/backup-load.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<span class="highlighted dimgray "></span>
<span class="highlighted dimgray "></span><span class="highlighted dimgray bg-red ">▀ ▀</span><span class="highlighted dimgray "></span> <span class="bold ">Ember Nexus API</span>
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.32, prod mode
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.33, prod mode

<span class="bold ">Backup Load</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/assets/database-drop.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<span class="highlighted dimgray "></span>
<span class="highlighted dimgray "></span><span class="highlighted dimgray bg-red ">▀ ▀</span><span class="highlighted dimgray "></span> <span class="bold ">Ember Nexus API</span>
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.32, prod mode
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.33, prod mode

<span class="bold ">Database Drop</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/assets/user-create.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<span class="highlighted dimgray "></span>
<span class="highlighted dimgray "></span><span class="highlighted dimgray bg-red ">▀ ▀</span><span class="highlighted dimgray "></span> <span class="bold ">Ember Nexus API</span>
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.32, prod mode
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.33, prod mode

<span class="bold ">User Create</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/assets/user-token-create.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<span class="highlighted dimgray "></span>
<span class="highlighted dimgray "></span><span class="highlighted dimgray bg-red ">▀ ▀</span><span class="highlighted dimgray "></span> <span class="bold ">Ember Nexus API</span>
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.32, prod mode
<span class="highlighted red "></span><span class="highlighted white "></span><span class="highlighted red "></span> v0.0.33, prod mode

<span class="bold ">User Token Create</span>

Expand Down

0 comments on commit ee287e2

Please sign in to comment.