Skip to content

Commit

Permalink
attempt a release
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP committed Jan 20, 2024
1 parent 87b958c commit 9b87d28
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 120 deletions.
77 changes: 45 additions & 32 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: release

on:
workflow_dispatch:
inputs:
release-version:
description: 'Version being released'
required: true
branch:
description: 'Branch to release from'
required: true
default: 'main'
push:
# TODO: revert these changes, just need to publish!
# workflow_dispatch:
# inputs:
# release-version:
# description: 'Version being released'
# required: true
# branch:
# description: 'Branch to release from'
# required: true
# default: 'main'

permissions:
contents: write
Expand All @@ -23,8 +25,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# Configure build steps as you'd normally do

- name: Setup Java
uses: actions/setup-java@v3
with:
Expand All @@ -36,36 +36,49 @@ jobs:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Compile
run: mvn clean install -DskipTests=true

- name: Setup Git
run: |
git config user.name "Chicory BOT"
git config user.email "[email protected]"
- name: Set the version
run: |
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.release-version }}
git add .
git commit -m "Release version update ${{ github.event.inputs.release-version }}"
git push
git tag ${{ github.event.inputs.release-version }}
git push origin ${{ github.event.inputs.release-version }}
env:
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
# - name: Set the version
# run: |
# mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.release-version }}
# git add .
# git commit -m "Release version update ${{ github.event.inputs.release-version }}"
# git push
# git tag ${{ github.event.inputs.release-version }}
# git push origin ${{ github.event.inputs.release-version }}
# env:
# GITHUB_TOKEN: ${{secrets.GH_TOKEN}}

- name: Release to Maven Central
run: |
export GPG_TTY=$(tty)
mvn clean install source:jar javadoc:jar deploy --batch-mode -Prelease -DskipTests -X
run: mvn --batch-mode clean deploy -Prelease -DskipTests=true -X
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Back to Snapshot
run: |
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=999-SNAPSHOT
git add .
git commit -m "Snapshot version update"
git push
env:
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
# - name: Release
# uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
# with:
# tag_name: ${{ github.event.inputs.release-version }}
# token: ${{secrets.GH_TOKEN}}

# - name: Back to Snapshot
# run: |
# mvn versions:set -DgenerateBackupPoms=false -DnewVersion=999-SNAPSHOT
# git add .
# git commit -m "Snapshot version update"
# git push
# env:
# GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
112 changes: 57 additions & 55 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<description>Native JVM WebAssembly runtime</description>
<url>https://github.com/dylibso/chicory</url>

<organization>
<name>Dylibso, Inc.</name>
<url>https://dylibso.com</url>
</organization>

<licenses>
<license>
<name>Apache-2.0</name>
Expand All @@ -25,9 +30,6 @@
<email>[email protected]</email>
<organization>Dylibso, Inc.</organization>
<organizationUrl>https://dylibso.com</organizationUrl>
<roles>
<role>Maintainer</role>
</roles>
</developer>
</developers>

Expand All @@ -51,6 +53,14 @@
<url>https://github.com/dylibso/chicory/issues</url>
</issueManagement>

<distributionManagement>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down Expand Up @@ -113,7 +123,6 @@
</dependencyManagement>

<build>

<pluginManagement>
<plugins>
<plugin>
Expand Down Expand Up @@ -204,6 +213,36 @@
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>none</doclint>
<source>1.8</source>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Expand Down Expand Up @@ -267,73 +306,36 @@
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
<configuration>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<additionalDependencies>
<additionalDependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${annotation-api.version}</version>
</additionalDependency>
</additionalDependencies>
<failOnError>false</failOnError>
<failOnWarnings>false</failOnWarnings>
<source>${maven.compiler.source}</source>
<additionalOptions>-Xdoclint:none</additionalOptions>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
12 changes: 1 addition & 11 deletions runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,13 @@
<groupId>com.dylibso.chicory</groupId>
<artifactId>chicory</artifactId>
<version>0.0.3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>runtime</artifactId>
<packaging>jar</packaging>
<name>Chicory - Runtime</name>
<description>Native JVM WebAssembly runtime</description>

<url>https://github.com/dylibso/chicory</url>

<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>

<dependencies>
<dependency>
<groupId>com.dylibso.chicory</groupId>
Expand Down
7 changes: 3 additions & 4 deletions test-gen-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<groupId>com.dylibso.chicory</groupId>
<artifactId>chicory</artifactId>
<version>0.0.3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>test-gen-plugin</artifactId>
<packaging>maven-plugin</packaging>

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<name>Chicory - Test Gen Maven Plugin</name>
<description>A Maven Plugin to generate tests from the WebAssembly testsuite</description>

<dependencies>
<dependency>
Expand Down
14 changes: 2 additions & 12 deletions wasi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@
<groupId>com.dylibso.chicory</groupId>
<artifactId>chicory</artifactId>
<version>0.0.3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wasi</artifactId>
<packaging>jar</packaging>
<name>Chicory - WASI</name>
<description>WASI Preview 1</description>

<url>https://github.com/dylibso/chicory</url>

<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<description>WASI Preview 1 impolementation for Chicory</description>

<dependencies>
<dependency>
Expand Down
7 changes: 3 additions & 4 deletions wasm-support-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<groupId>com.dylibso.chicory</groupId>
<artifactId>chicory</artifactId>
<version>0.0.3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wasm-support-plugin</artifactId>
<packaging>maven-plugin</packaging>

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<name>Chicory - Wasm Support Maven Plugin</name>
<description>A Maven Plugin to generate a Java class from tsv OpCodes</description>

<dependencies>
<dependency>
Expand Down
3 changes: 1 addition & 2 deletions wasm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<groupId>com.dylibso.chicory</groupId>
<artifactId>chicory</artifactId>
<version>0.0.3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wasm</artifactId>
<packaging>jar</packaging>

<name>Chicory - WASM</name>
<description>WebAssembly tools</description>
<url>https://github.com/dylibso/chicory</url>

<dependencies>
<dependency>
Expand Down

0 comments on commit 9b87d28

Please sign in to comment.