From c603fac121c388dc570d89368876689ad3f83d1b Mon Sep 17 00:00:00 2001 From: Goncalo-FradeIOHK Date: Fri, 16 Jun 2023 14:51:06 +0100 Subject: [PATCH 1/4] build: add semantic release workflow --- .github/workflows/release.yml | 51 +++++++++++++++++++++++ package.json | 76 +++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 package.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..4187e267 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +--- +name: Release sdk + +on: + push: + branches: + - main + pull_request: + branches: [main] + +jobs: + release: + env: + ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }} + ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.ATALA_GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "lts/*" + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 11 + + - uses: crazy-max/ghaction-import-gpg@v5 + id: import_gpg + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + git_user_signingkey: true + git_commit_gpgsign: true + + - name: Release + env: + GIT_AUTHOR_EMAIL: ${{ steps.import_gpg.outputs.email }} + GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }} + GIT_AUTHOR_NAME: ${{ steps.import_gpg.outputs.name }} + GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }} + run: | + npm install + npx semantic-release diff --git a/package.json b/package.json new file mode 100644 index 00000000..c33820a5 --- /dev/null +++ b/package.json @@ -0,0 +1,76 @@ +{ + "name": "atala-prism-wallet-sdk-swift", + "version": "2.1", + "description": "atala-prism-wallet-sdk-swift", + "directories": { + "example": "examples" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/input-output-hk/atala-prism-wallet-sdk-swift.git" + }, + "author": "IOG", + "license": "ISC", + "bugs": { + "url": "https://github.com/input-output-hk/atala-prism-wallet-sdk-swift/issues" + }, + "homepage": "https://github.com/input-output-hk/atala-prism-wallet-sdk-swift#readme", + "devDependencies": { + "@semantic-release/changelog": "^6.0.2", + "@semantic-release/exec": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "gradle-semantic-release-plugin": "^1.7.4", + "semantic-release": "^19.0.5", + "semantic-release-slack-bot": "^3.5.3" + }, + "release": { + "branches": [ + { + "name": "main" + }, + { + "name": "prerelease/*", + "prerelease": "snapshot" + } + ], + "tagFormat": "${version}", + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/exec", + { + "prepareCmd": "npm version ${nextRelease.version} --git-tag-version false" + } + ], + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md" + } + ], + [ + "@semantic-release/git", + { + "assets": [ + "CHANGELOG.md", + "package.json", + "package-lock.json" + ], + "message": "chore(release): cut wallet sdk swift ${nextRelease.version} release\n\n${nextRelease.notes}" + } + ], + [ + "semantic-release-slack-bot", + { + "notifyOnSuccess": true, + "notifyOnFail": true, + "markdownReleaseNotes": true, + "onSuccessTemplate": { + "text": "A new version of Swift Wallet SDK successfully released!\nVersion: `$npm_package_version`\nTag: $repo_url/releases/tag/$npm_package_version\n\nRelease notes:\n$release_notes" + } + } + ] + ] + } +} \ No newline at end of file From 136b23022f82c42379ab4b58b7f81a0c18acff00 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Fri, 16 Jun 2023 15:48:50 +0100 Subject: [PATCH 2/4] chore: some fixes --- .github/workflows/release.yml | 1 + CHANGELOG.md | 0 package.json | 3 +-- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4187e267..84a73355 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: - main pull_request: branches: [main] + workflow_dispatch: jobs: release: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e69de29b diff --git a/package.json b/package.json index c33820a5..7a4145f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "atala-prism-wallet-sdk-swift", - "version": "2.1", + "version": "2.0.1", "description": "atala-prism-wallet-sdk-swift", "directories": { "example": "examples" @@ -19,7 +19,6 @@ "@semantic-release/changelog": "^6.0.2", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", - "gradle-semantic-release-plugin": "^1.7.4", "semantic-release": "^19.0.5", "semantic-release-slack-bot": "^3.5.3" }, From 6ca7afb95ff2b2eae6854fc17ba6c5c23ae11003 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Fri, 16 Jun 2023 15:59:57 +0100 Subject: [PATCH 3/4] chore: remove pr from on targets --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84a73355..7f8fdb69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,6 @@ on: push: branches: - main - pull_request: - branches: [main] workflow_dispatch: jobs: From 24a4d917bf2da3dee5f3a4e0e6f2c61990a491b1 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Mon, 7 Aug 2023 15:49:54 +0100 Subject: [PATCH 4/4] chore: some clean ups --- .github/workflows/release.yml | 6 ------ package.json | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f8fdb69..be2682a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,12 +26,6 @@ jobs: with: node-version: "lts/*" - - name: Setup Java - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: 11 - - uses: crazy-max/ghaction-import-gpg@v5 id: import_gpg with: diff --git a/package.json b/package.json index 7a4145f2..5dfe7afe 100644 --- a/package.json +++ b/package.json @@ -72,4 +72,4 @@ ] ] } -} \ No newline at end of file +}