Skip to content

Commit

Permalink
Create LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Kostromin committed Mar 29, 2022
1 parent 9250234 commit 2532305
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 41 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check-versions-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
#manual job definition:
if: startsWith(github.event.inputs.trigger, 'm')
|| startsWith(github.event.inputs.trigger, 'M')
name: updates java-${{ matrix.java }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
40 changes: 25 additions & 15 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
name: pre-release
on:
workflow_dispatch:
inputs:
trigger:
description: Type m to triggre manual jobs
required: false
default: ''
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
tags-ignore:
- '*'
env:
JAVA_VERSION: '17'
jobs:
pre-release:
#if: startsWith(github.event.inputs.trigger, 'm')
# || startsWith(github.event.inputs.trigger, 'M')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -45,13 +37,31 @@ jobs:
# folder: target/generated-docs # The folder the action should deploy.
## Create 'latest' pre-release
- run: mkdir -p $GITHUB_WORKSPACE/dist
- run: mv -f $GITHUB_WORKSPACE/build/libs/*.jar $GITHUB_WORKSPACE/dist/gradle-app.jar
- run: mv -f $GITHUB_WORKSPACE/target/*.jar $GITHUB_WORKSPACE/dist/maven-app.jar
- uses: "marvinpinto/action-automatic-releases@latest"
- run: cp -Rfv $GITHUB_WORKSPACE/build/libs/*.jar $GITHUB_WORKSPACE/build/libs/gradle-app.jar
- run: mv -f $GITHUB_WORKSPACE/build/libs/*.jar $GITHUB_WORKSPACE/dist/
- run: cp -Rfv $GITHUB_WORKSPACE/target/*.jar $GITHUB_WORKSPACE/target/maven-app.jar
- run: cp -Rfv $GITHUB_WORKSPACE/target/*.jar $GITHUB_WORKSPACE/dist/
- name: Set env variables
id: refs_names
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Get env variables
env:
SOURCE_NAME: ${{ steps.refs_names.outputs.SOURCE_NAME }}
SOURCE_BRANCH: ${{ steps.refs_names.outputs.SOURCE_BRANCH }}
SOURCE_TAG: ${{ steps.refs_names.outputs.SOURCE_TAG }}
run: |
echo $SOURCE_NAME
echo $SOURCE_BRANCH
echo $SOURCE_TAG
- uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
title: "Latest ${{ steps.refs_names.outputs.SOURCE_NAME }} build"
files: |
dist/*.jar
dist/**/*.jar
LICENSE.txt
65 changes: 41 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: release
on:
workflow_dispatch:
inputs:
trigger:
description: Type m to triggre manual jobs
required: false
default: ''
push:
tags:
- 'v*'
# workflow_dispatch:
# inputs:
# trigger:
# description: Type m to triggre manual jobs
# required: false
# default: ''
env:
JAVA_VERSION: '17'
jobs:
release:
if: startsWith(github.event.inputs.trigger, 'm')
|| startsWith(github.event.inputs.trigger, 'M')
# if: startsWith(github.event.inputs.trigger, 'm')
# || startsWith(github.event.inputs.trigger, 'M')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -33,25 +33,42 @@ jobs:
- run: cd $GITHUB_WORKSPACE ; ./gradlew --no-daemon --stop
- run: cd $GITHUB_WORKSPACE ; ./gradlew --no-daemon --console=plain clean build
- run: cd $GITHUB_WORKSPACE ; ./mvnw clean verify
## TODO: Publish docker images
#- run: cd $GITHUB_WORKSPACE ; docker build --no-cache -t daggerok/file-items-service -f ./linux-services/file-items-service/Dockerfile .
#- run: cd $GITHUB_WORKSPACE ; docker build --no-cache -t daggerok/file-server -f ./linux-services/file-server/Dockerfile .
## TODO: Publish github release with assets and update back github pages documentation to use jars from github release
#- name: Deploy 🚀 GitHub Pages
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages # The branch the action should deploy to.
# folder: target/generated-docs # The folder the action should deploy.
## Create 'latest' pre-release
# # TODO: Publish docker images
# - run: cd $GITHUB_WORKSPACE ; docker build --no-cache -t daggerok/file-items-service -f ./linux-services/file-items-service/Dockerfile .
# - run: cd $GITHUB_WORKSPACE ; docker build --no-cache -t daggerok/file-server -f ./linux-services/file-server/Dockerfile .
# # TODO: Publish github release with assets and update back github pages documentation to use jars from github release
# - name: Deploy 🚀 GitHub Pages
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages # The branch the action should deploy to.
# folder: target/generated-docs # The folder the action should deploy.
## Create 'tagged' pre-release
- run: mkdir -p $GITHUB_WORKSPACE/dist
- run: mv -f $GITHUB_WORKSPACE/build/libs/*.jar $GITHUB_WORKSPACE/dist/gradle-app.jar
- run: mv -f $GITHUB_WORKSPACE/target/*.jar $GITHUB_WORKSPACE/dist/maven-app.jar
- uses: "marvinpinto/action-automatic-releases@latest"
- run: cp -Rfv $GITHUB_WORKSPACE/build/libs/*.jar $GITHUB_WORKSPACE/build/libs/gradle-app.jar
- run: mv -f $GITHUB_WORKSPACE/build/libs/*.jar $GITHUB_WORKSPACE/dist/
- run: cp -Rfv $GITHUB_WORKSPACE/target/*.jar $GITHUB_WORKSPACE/target/maven-app.jar
- run: cp -Rfv $GITHUB_WORKSPACE/target/*.jar $GITHUB_WORKSPACE/dist/
- name: Set env variables
id: refs_names
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Get env variables
env:
SOURCE_NAME: ${{ steps.refs_names.outputs.SOURCE_NAME }}
SOURCE_BRANCH: ${{ steps.refs_names.outputs.SOURCE_BRANCH }}
SOURCE_TAG: ${{ steps.refs_names.outputs.SOURCE_TAG }}
run: |
echo $SOURCE_NAME
echo $SOURCE_BRANCH
echo $SOURCE_TAG
- uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
prerelease: false
title: "Build ${{ steps.refs_names.outputs.SOURCE_TAG }}"
files: |
LICENSE.txt
*.jar
dist/*.jar
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
if: github.event.inputs.trigger == ''
|| !startsWith(github.event.inputs.trigger, 'm')
|| !startsWith(github.event.inputs.trigger, 'M')
name: check java-${{ matrix.java }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-present Maksim Kostromin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# github-action-release-example [![tests](https://github.com/daggerok/github-action-release-example/actions/workflows/tests.yml/badge.svg)](https://github.com/daggerok/github-action-release-example/actions/workflows/tests.yml) [![pre-release](https://github.com/daggerok/github-action-release-example/actions/workflows/pre-release.yml/badge.svg)](https://github.com/daggerok/github-action-release-example/actions/workflows/pre-release.yml)
Release apps with github-actions

## on master push re-tag each `master` build and publish `latest` pre-release

## on any vX.Y.Z tag publish associated release

```bash
git tag v0.0.1
git push --tags
```

## RTFM
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.6.5/maven-plugin/reference/html/)
Expand Down

0 comments on commit 2532305

Please sign in to comment.