-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from sai80082/main
Automated releases and packages versioning
- Loading branch information
Showing
4 changed files
with
101 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new-release-published: ${{ steps.release.outputs.new-release-published }} | ||
new-release-version: ${{ steps.release.outputs.new-release-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- name: Run semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
id: release | ||
run: | | ||
npm install | ||
npx semantic-release | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: release | ||
if: needs.release.outputs.new-release-published == 'true' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
run: | | ||
docker build --build-arg VERSION=${{ needs.release.outputs.new-release-version }} \ | ||
-t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \ | ||
-t ghcr.io/${{ github.repository }}:latest . | ||
docker push ghcr.io/${{ github.repository }}:latest | ||
docker push ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"branches": ["main"], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{ "type": "docs", "release": false }, | ||
{ "type": "refactor", "release": false}, | ||
{ "type": "feat", "release": "minor" }, | ||
{ "type": "fix", "release": "patch" }, | ||
{ "type": "perf", "release": "patch" }, | ||
{ "type": "chore", "release": false } | ||
] | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "angular", | ||
"writerOpts":{ | ||
"headerPartial":"## {{#if isPatch~}} <small>{{~/if~}} 🚀 **Immich Power Tools** {{version}}{{~#if isPatch~}} </small>{{~/if}}" | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": false | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": [] | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["package.json"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
["semantic-release-export-data"] | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters