Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

publish packages #1

Merged
merged 26 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: publish-packages

on:
push:
branches:
- main

jobs:
version:
name: Bump version and push tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
uses: hennejg/github-tag-action@v4.2.4
with:
default_bump: patch
tag_prefix: ""
release_branches: ci/publish-packages
github_token: ${{ secrets.RADIXBOT_GITHUB_REPO_PACKAGES_TOKEN }}
build:
runs-on: ubuntu-latest
name: Build and publish maven packages
permissions:
contents: read
packages: write
needs: version
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Restore Maven cache
uses: skjolber/maven-cache-github-action@v1
with:
step: restore
- name: Build
run: |
ls -l
export VERSIONING_UPDATE_POM=true
./mvnw -Dversioning.preferTags=true clean package deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save Maven cache
uses: skjolber/maven-cache-github-action@v1
with:
step: save

changelog:
name: Update changelog
runs-on: ubuntu-latest
needs: version
steps:
- name: update changelog
uses: heinrichreimer/github-changelog-generator-action@v2.2
with:
token: ${{ secrets.GITHUB_TOKEN }}

publish-npm:
runs-on: ubuntu-latest
needs: version
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@radixdlt'
- run: |
GIT_TAG=$(git tag --points-at HEAD --sort -version:refname | head -1 )
npm version $GIT_TAG
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,8 @@ temp/
*.iws
*.iml
*.ipr

#Generated by version plugin
.git-versioned-pom.xml
#Generated by github actions
settings.xml
10 changes: 10 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 https://maven.apache.org/xsd/core-extensions-1.0.0.xsd">

<extension>
<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>6.4.3</version>
</extension>

</extensions>
15 changes: 15 additions & 0 deletions .mvn/maven-git-versioning-extension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-6.4.0.xsd">
<branch>
<pattern>main</pattern>
<versionFormat>${version}</versionFormat>
</branch>
<branch>
<pattern>feature/(.+)</pattern>
<versionFormat>${1}-SNAPSHOT</versionFormat>
</branch>
<tag>
<pattern>v([0-9].*)</pattern>
<versionFormat>${1}</versionFormat>
</tag>
</configuration>
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# open-rpc-spec
The shared OpenRPC specification used for the Radix code API.

# Versioning
Here is an example of the release type that will be done based on a commit messages:

| Commit message | Release type |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
| `feat(pencil): add 'graphiteWidth' option` | Minor Release |
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | Major Release |

If no commit message contains any information, then **default_bump** (patch) will be used.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@radixdlt/open-rpc-spec",
"version": "1.0.1",
"version": "1.2.3",
"main": "src-js/main.js",
"repository": "git@github.com:radixdlt/open-rpc-spec.git",
"author": "Alexander Wormbs <alexander@radixdlt.com>",
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,11 @@
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/radixdlt/open-rpc-spec</url>
</repository>
</distributionManagement>
</project>