Skip to content

Commit

Permalink
update release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Jan 17, 2024
1 parent a297363 commit 21cac7a
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 147 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bump
on:
push:
branches:
- main

jobs:
build:
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event.pull_request.draft != true
steps:
- name: Checkout code
uses: actions/[email protected]

- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
os: ${{ runner.os }}

- name: Build
run: yarn build

bump:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]

- name: Bumping version
uses: jpb06/[email protected]
with:
major-keywords: BREAKING CHANGE
minor-keywords: feat,minor
patch-keywords: fix,chore
should-default-to-patch: true
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Release
on:
push:
tags:
- "*.*.*"

jobs:
build:
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event.pull_request.draft != true
steps:
- name: Checkout code
uses: actions/[email protected]

- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
os: ${{ runner.os }}

- name: Build
run: yarn build

publish:
name: Build and push Docker container
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: ghcr.io/pluralsh/renovate
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: "."
file: "./Dockerfile"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max

release:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Create GitHub release
uses: softprops/[email protected]
with:
generate_release_notes: true
97 changes: 0 additions & 97 deletions .releaserc

This file was deleted.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "renovate",
"description": "Automated dependency updates. Flexible so you don't need to be.",
"version": "0.0.0-semantic-release",
"version": "1.0.0",
"type": "commonjs",
"bin": {
"renovate": "dist/renovate.js",
Expand Down Expand Up @@ -45,7 +45,6 @@
"prettier": "prettier --cache --check '**/*.{ts,js,mjs,json,md,yml}'",
"prettier-fix": "prettier --write --cache '**/*.{ts,js,mjs,json,md,yml}'",
"release:prepare": "ts-node tools/generate-docs.ts",
"release:publish": "node tools/release.mjs",
"start": "ts-node lib/renovate.ts",
"test": "run-s lint test-schema jest",
"test-dirty": "git diff --exit-code",
Expand Down Expand Up @@ -264,7 +263,6 @@
"@ls-lint/ls-lint": "2.2.2",
"@openpgp/web-stream-tools": "0.0.14",
"@renovate/eslint-plugin": "file:tools/eslint",
"@semantic-release/exec": "6.0.3",
"@swc/core": "1.3.102",
"@types/auth-header": "1.0.6",
"@types/aws4": "1.11.6",
Expand Down Expand Up @@ -338,7 +336,6 @@
"nyc": "15.1.0",
"pretty-format": "29.7.0",
"rimraf": "5.0.5",
"semantic-release": "22.0.12",
"tar": "6.2.0",
"tmp-promise": "3.0.3",
"ts-jest": "29.1.1",
Expand Down
38 changes: 0 additions & 38 deletions tools/dispatch-release.mjs

This file was deleted.

8 changes: 0 additions & 8 deletions tools/release.mjs

This file was deleted.

0 comments on commit 21cac7a

Please sign in to comment.