diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml new file mode 100644 index 0000000..5685258 --- /dev/null +++ b/.github/workflows/conventional-commits.yml @@ -0,0 +1,12 @@ +name: Conventional Commits + +on: + pull_request: + +jobs: + conventional-commits: + name: Conventional Commits + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: webiny/action-conventional-commits@v1.1.0 diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml new file mode 100644 index 0000000..e46615f --- /dev/null +++ b/.github/workflows/precommit.yml @@ -0,0 +1,10 @@ +name: pre-commit + +on: + pull_request: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: makandra/github-actions/precommit@main diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml new file mode 100644 index 0000000..34c9c60 --- /dev/null +++ b/.github/workflows/semantic-release.yml @@ -0,0 +1,33 @@ +name: "Semantic-Release" +on: + push: + branches: + - master + - main + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Semantic Release + id: semantic + uses: cycjimmy/semantic-release-action@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and Push Docker Image + uses: docker/build-push-action@v3 + with: + push: true + tags: | + ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_git_tag }} + ghcr.io/${{ github.repository }}:latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..960319c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.2.0 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: check-vcs-permalinks + - id: end-of-file-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + exclude: CHANGELOG.md + - id: check-yaml + - id: check-executables-have-shebangs + - id: check-case-conflict + - id: mixed-line-ending + args: [--fix=lf] + - id: detect-aws-credentials + args: ['--allow-missing-credentials'] + - id: detect-private-key diff --git a/package.json b/package.json new file mode 100644 index 0000000..fb7a783 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "alpine-envsubst", + "license": "MIT", + "devDependencies": { + "@semantic-release/github": "^8.0.7", + "git-cz": "^4.9.0", + "semantic-release": "^19.0.5" + }, + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/npm", { + "npmPublish": false + } + ], + "private": true, + "release": { + "branches": [ + "main", "master" + ] + } +}