Skip to content

Commit

Permalink
ci: adding semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikZed committed Jul 5, 2023
1 parent 88fde10 commit 012fbad
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8.6.1
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "pnpm"

- name: Install dependencies
run: pnpm i
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: pnpm audit signatures
- name: Build package
run: pnpm build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strapi-provider-cloudflare-r2",
"version": "0.1.12",
"version": "0.0.0-development",
"description": "Strapi Cloudflare R2+CDN provider for strapi upload",
"strapi": {
"name": "strapi-provider-cloudflare-r2",
Expand Down Expand Up @@ -34,7 +34,8 @@
}
],
"scripts": {
"test": "echo \"no tests yet\""
"test": "echo \"no tests yet\"",
"semantic-release": "semantic-release"
},
"release": {
"branches": [
Expand All @@ -54,5 +55,12 @@
"engines": {
"node": ">=14.19.1 <=19.x.x",
"npm": ">=6.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/trieb-work/strapi-provider-cloudflare-r2.git"
},
"devDependencies": {
"semantic-release": "^21.0.7"
}
}

0 comments on commit 012fbad

Please sign in to comment.