feat: linting
This commit is contained in:
parent
5b938091d7
commit
9d4e8c9a9d
2 changed files with 42 additions and 11 deletions
43
.github/workflows/release.yml
vendored
43
.github/workflows/release.yml
vendored
|
|
@ -44,22 +44,43 @@ jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: stackit-docker
|
runs-on: stackit-docker
|
||||||
# needs: build
|
# needs: build
|
||||||
|
outputs:
|
||||||
|
tag: ${{ steps.create_release.outputs.tag }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Semantic Release
|
# - name: Semantic Release
|
||||||
uses: go-semantic-release/action@v1
|
# uses: go-semantic-release/action@v1
|
||||||
id: semrel
|
# id: semrel
|
||||||
|
# with:
|
||||||
|
# github-token: ${{ env.FORGEJO_TOKEN }}
|
||||||
|
# allow-initial-development-versions: true
|
||||||
|
# # update-file: package.json
|
||||||
|
# changelog-file: CHANGELOG.md
|
||||||
|
# changelog-generator-opt: "emojis=true"
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
github-token: ${{ env.FORGEJO_TOKEN }}
|
node-version: '20'
|
||||||
allow-initial-development-versions: true
|
|
||||||
# update-file: package.json
|
- name: Create Release
|
||||||
changelog-file: CHANGELOG.md
|
env:
|
||||||
changelog-generator-opt: "emojis=true"
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
|
id: create_release
|
||||||
|
run: |
|
||||||
|
npx \
|
||||||
|
-p semantic-release \
|
||||||
|
-p @semantic-release/commit-analyzer \
|
||||||
|
-p @semantic-release/release-notes-generator \
|
||||||
|
-p @semantic-release/changelog \
|
||||||
|
-p @semantic-release/git \
|
||||||
|
semantic-release
|
||||||
|
echo "tag=$(git describe --tags --abbrev=0)" >> $FORGEJO_OUTPUT
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
if: steps.semrel.outputs.version != ''
|
if: steps.create_release.outputs.tag != ''
|
||||||
uses: docker/login-action@v4
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: ${{ forgejo.server_url }}
|
registry: ${{ forgejo.server_url }}
|
||||||
|
|
@ -71,11 +92,11 @@ jobs:
|
||||||
# uses: docker/setup-qemu-action@v4
|
# uses: docker/setup-qemu-action@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: steps.semrel.outputs.version != ''
|
if: steps.create_release.outputs.tag != ''
|
||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
push: false
|
push: false
|
||||||
tags: actions/notify-slim:${{ steps.semrel.outputs.version }}
|
tags: actions/notify-slim:${{ steps.create_release.outputs.tag }}
|
||||||
|
|
|
||||||
10
.releaserc.json
Normal file
10
.releaserc.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"branches": ["main"],
|
||||||
|
"tagFormat": "v${version}",
|
||||||
|
"plugins": [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
"@semantic-release/git"
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue