Skip to content

Commit

Permalink
Merge pull request #2 from cloudkats/feat/setup-github
Browse files Browse the repository at this point in the history
feat: setup github and added release job
  • Loading branch information
ivankatliarchuk authored Sep 26, 2021
2 parents 89a0482 + 606a4f1 commit 1716ef7
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
_extends: .github

name-template: 'v$RESOLVED_VERSION'
16 changes: 16 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
_extends: .github

repository:
name: fastlane-plugin-saucelabs
description: "💥 SauceLabs plugin for fastlane"
topics: fastlane, saucelabs, fastlane-plugin, android, ios
homepage: https://github.com/cloudkats/fastlane-plugin-saucelabs
private: false
has_projects: false
has_wiki: false
is_template: false
has_downloads: false

branches:
- name: main
52 changes: 52 additions & 0 deletions .github/workflows/release.draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: release-drafter

on:
push:
branches: [main, master]
workflow_dispatch:
inputs:
prerelease:
description: Is this a pre-release
required: true
default: true
publish:
description: Publish release
required: false
default: false
bump:
description: 'Bumping (#major, #minor or #patch)'
required: false
default: patch

jobs:
draft-a-release:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2.3.4

- name: check next version
uses: anothrNick/github-tag-action@1.36.0
id: tag
env:
DRY_RUN: true
WITH_V: true
DEFAULT_BUMP: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.bump || 'patch' }}

- name: release-draft
uses: release-drafter/release-drafter@v5.15.0
if: "!contains(github.event.head_commit.message, 'skip')"
# contains(github.event.head_commit.message, 'release')
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
publish: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish || 'false' }}
prerelease: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.prerelease || 'true' }}
tag: ${{ steps.tag.outputs.new_tag }}

- name: check-version
run: |
echo "release it: ${{ github.event.inputs.prerelease }}"
echo "out: ${{ steps.release.name }}"
echo "tag: ${{ steps.release.outputs.tag_name }}"
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SHELL := /bin/bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules

INSTALL_BREW ?= false
export PYENV_LOCATION ?= $(shell which pyenv)

help:
@printf "Usage: make [target] [VARIABLE=value]\nTargets:\n"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

hooks: ## Setup pre commit.
@pre-commit install
@pre-commit gc
@pre-commit autoupdate

validate: ## Validate files with pre-commit hooks
@pre-commit run --all-files

0 comments on commit 1716ef7

Please sign in to comment.