Skip to content

Commit

Permalink
Adding automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
jackah2 committed Jan 12, 2021
1 parent 267edce commit 9fdda6c
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,29 @@
---
name: "Release"

on:
push:
branches:
- "master"

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Generate ~/.m2/settings.xml
uses: whelk-io/maven-settings-xml-action@v14
with:
servers: '[{ "id": "github", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}" }]'

- name: Publish Release
run: mvn package github-release-plugin:gh-upload
2 changes: 2 additions & 0 deletions README.md
@@ -1,4 +1,6 @@
# WHIMC-PositionTracker
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/whimc/Position-Tracker?label=download&logo=github)](https://github.com/whimc/Position-Tracker/releases/latest)

Track player positions to a database

## Building
Expand Down
34 changes: 33 additions & 1 deletion pom.xml
Expand Up @@ -31,12 +31,44 @@
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<!-- Import github release plugin -->
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-cy6ergn0m-maven</id>
<name>bintray-plugins</name>
<url>http://dl.bintray.com/cy6ergn0m/maven</url>
</pluginRepository>
</pluginRepositories>

<!-- Repo for plugin -->
<scm>
<connection>scm:git:git@github.com:whimc/Position-Tracker.git</connection>
<tag>HEAD</tag>
</scm>

<build>
<!-- Allow pom.xml value substitution in plugin.yml -->
<resources>
<resource>
<directory>src/main/resources</directory> <!-- (your resources folder location) -->
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>

<!-- Github release settings -->
<plugins>
<plugin>
<groupId>cy.github</groupId>
<artifactId>github-release-plugin</artifactId>
<version>0.5.1</version>

<configuration>
<releaseTitle>${project.artifactId}-${project.version}</releaseTitle>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 9fdda6c

Please sign in to comment.