-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4d6804e
Showing
6 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Container image that runs your code | ||
FROM ghcr.io/packagrio/packagr:latest-node | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
# Code file to execute when the docker container starts up (`entrypoint.sh`) | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 PackagrIO | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# action-releasr-go | ||
|
||
<p align="center"> | ||
<a href="https://github.com/PackagrIO/docs"> | ||
<img width="300" alt="portfolio_view" src="https://github.com/PackagrIO/releasr/raw/master/images/releasr.png"> | ||
</a> | ||
</p> | ||
|
||
Github Action that allows you to commit local changes & tag Go repositories | ||
|
||
# Documentation | ||
Full documentation is available at [PackagrIO/docs](https://github.com/PackagrIO/docs) | ||
|
||
# Usage | ||
|
||
```yaml | ||
name: Release | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/packagrio/packagr-dev:master | ||
env: | ||
PROJECT_PATH: /go/src/github.com/packagrio/publishr | ||
steps: | ||
# Fetch depth 0 is required for committing changes | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
# ... do your compile, testing, bumpr, etc steps here. | ||
- name: Commit Changes | ||
id: commit | ||
uses: packagrio/action-releasr-node@master | ||
env: | ||
# This is necessary in order to push a commit to the repo | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged | ||
|
||
# ... do your publishr steps here. | ||
|
||
``` | ||
|
||
# Inputs | ||
|
||
# Outputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version := "1.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'Node Releasr' | ||
description: 'Github Action that allows you to commit local changes & tag Node repositories' | ||
inputs: | ||
version_metadata_path: | ||
description: 'Path to file containing Version string' | ||
required: true | ||
default: 'package.json' | ||
author_name: | ||
description: 'Commit Author' | ||
required: true | ||
default: 'packagrio-bot' | ||
author_email: | ||
description: 'Commit Author Email' | ||
required: true | ||
default: 'packagr-io[bot]@users.noreply.github.com' | ||
cwd: | ||
description: 'Working Directory' | ||
required: false | ||
default: '' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
env: | ||
PACKAGR_VERSION_METADATA_PATH: ${{ inputs.version_metadata_path }} | ||
PACKAGR_ENGINE_GIT_AUTHOR_NAME: ${{ inputs.author_name }} | ||
PACKAGR_ENGINE_GIT_AUTHOR_EMAIL: ${{ inputs.author_email }} | ||
CUSTOM_WORKING_DIRECTORY: ${{ inputs.cwd }} | ||
branding: | ||
icon: 'tag' | ||
color: 'blue' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
PATH=/srv/packagr:$PATH | ||
|
||
# retrieve the latest releasr binary | ||
asset_url=$(curl -s https://api.github.com/repos/PackagrIO/releasr/releases/latest \ | ||
| grep browser_download_url | grep 'packagr-releasr-linux-amd64' | cut -d '"' -f 4) | ||
|
||
# download the releasr asset here. | ||
curl -L -o /srv/packagr/packagr-releasr $asset_url | ||
|
||
# make releasr executable | ||
chmod +x /srv/packagr/packagr-releasr | ||
|
||
if [[ ! -z "${CUSTOM_WORKING_DIRECTORY}" ]]; then | ||
echo "using custom dir: ${CUSTOM_WORKING_DIRECTORY}" | ||
cd "${CUSTOM_WORKING_DIRECTORY}" | ||
fi | ||
|
||
echo "Starting Releasr $1" | ||
packagr-releasr start --scm github --package_type node |