Skip to content

Commit

Permalink
Merge pull request #174 from OutSystems/git-workflow
Browse files Browse the repository at this point in the history
Repo improvements
  • Loading branch information
joselrio authored May 10, 2024
2 parents 30f2bd3 + 841b723 commit 05e32e9
Show file tree
Hide file tree
Showing 21 changed files with 842 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .github/os-git-actions/manual-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
steps:
- name: Add new files (if needed)
shell: bash
if: ${{ inputs.newFiles }}
if: ${{ inputs.newFiles == 'true' }}
run: |
git add .
Expand Down
4 changes: 2 additions & 2 deletions .github/os-git-actions/signed-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ runs:
using: composite
steps:
- name: Setup GPG to sign commits
uses: ./.github/setup-gpg/
uses: ./.github/os-git-actions/setup-gpg/
with:
gpgPriv: ${{ inputs.gpgPriv }}
gpgPassPhrase: ${{ inputs.gpgPassPhrase }}

- name: Perform git commit
uses: ./.github/manual-commit/
uses: ./.github/os-git-actions/manual-commit/
with:
branch: ${{ inputs.branch }}
message: ${{ inputs.message }}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/AddInnerSourcingLabel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Add Inner Sourcing Label

on:
pull_request:
types:
- opened

jobs:
inner_sourcing:
uses: OutSystems/rd.github-reusable-workflows/.github/workflows/[email protected]
with:
codeowners-path: .github/CODEOWNERS
secrets: inherit
12 changes: 1 addition & 11 deletions .github/workflows/dev-pr.yml → .github/workflows/DevPR.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: DEV_PR
name: PullRequest into Dev branch
on:
# Triggers the workflow on push events but only for the "dev" branch.
pull_request:
branches: ['dev']

workflow_dispatch:

jobs:
eslint:
runs-on: ubuntu-latest
Expand All @@ -16,10 +14,6 @@ jobs:
- name: Checkout branch dev
uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Install project dependencies
run: npm install

Expand All @@ -33,10 +27,6 @@ jobs:
- name: Checkout branch dev
uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Install project dependencies
run: npm install

Expand Down
123 changes: 123 additions & 0 deletions .github/workflows/PreRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Pre-Release

on:
workflow_dispatch:
inputs:
new-version:
description: 'New version to be set. (1.0.1)'
type: string
required: true
release-date:
description: 'Release date. (YYYY-MM-DD)'
type: string
required: true
new-dev-release:
description: 'Set the new dev version. (1.0.1)'
type: string
required: false

jobs:
run-lint-on-dev:
runs-on: ubuntu-latest

if: ${{ inputs.new-version }}
steps:
- name: Checkout into dev
uses: actions/checkout@v4
with:
ref: dev
token: ${{ secrets.PAT }}

- name: Install project dependencies
run: npm install

- name: Run build
run: npm run build

create-rc:
needs: run-lint-on-dev
runs-on: ubuntu-latest

if: ${{ inputs.new-version }}
steps:
- name: Checkout into dev
uses: actions/checkout@v4
with:
ref: dev
token: ${{ secrets.PAT }}

- name: Create branch rc${{ inputs.new-version }}
run: |
git checkout -b rc${{ inputs.new-version }}
git push -u origin rc${{ inputs.new-version }}
set-tag:
needs: create-rc
runs-on: ubuntu-latest

if: ${{ inputs.new-version }}
steps:
- name: Checkout into rc${{ inputs.new-version }}
uses: actions/checkout@v4
with:
ref: rc${{ inputs.new-version }}
fetch-depth: 0
token: ${{ secrets.PAT }}

- name: Set tag
run: |
git tag v${{ inputs.new-version }} HEAD
git push origin --tags
set-pre-release:
needs: set-tag
runs-on: ubuntu-latest

if: ${{ inputs.new-version }}
steps:
- name: Create Release
id: create_release
uses: softprops/[email protected]
with:
tag_name: v${{ inputs.new-version }}
name: Release of version ${{ inputs.new-version }} (${{ inputs.release-date }})
body: |
### What's New
- First
- ...
### Fixed Issues and Improvements
- First
- ...
draft: false
prerelease: true
token: ${{ secrets.PAT }}

update-dev-version:
needs: create-rc
runs-on: ubuntu-latest

if: ${{ inputs.new-version && inputs.new-dev-release }}
steps:
- name: Checkout into dev
uses: actions/checkout@v4
with:
ref: dev
token: ${{ secrets.PAT }}

- name: Install project dependencies
run: npm install

- name: Update dev version into v${{ inputs.new-dev-release }}
run: |
npm run gta-update-version --newVersion=${{ inputs.new-dev-release }}
- name: Sign and Commit version increment to branch dev
uses: ./.github/os-git-actions/signed-commit/
with:
branch: dev
message: 'Updated into v${{ inputs.new-dev-release }} [skip ci]'
newFiles: true
gpgPriv: ${{ secrets.GPG_SIGN_KEY }}
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }}
78 changes: 78 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Release

on:
workflow_dispatch:
inputs:
new-version:
description: 'Version to be released.'
type: string
required: true
update-prerelease-into-latest:
description: 'Update pre-release into latest.'
type: boolean
default: true
delete-rc-branch:
description: 'Delete rc* branch at the end of process.'
type: boolean
default: true

jobs:
run-lint-on-rc:
runs-on: ubuntu-latest

if: ${{ inputs.new-version }}
steps:
- name: Checkout into rc${{ inputs.new-version }}
uses: actions/checkout@v4
with:
ref: rc${{ inputs.new-version }}
token: ${{ secrets.PAT }}

- name: Install project dependencies
run: npm install

- name: Run build
run: npm run build

merge-rc-into-main:
needs: run-lint-on-rc
runs-on: ubuntu-latest

if: ${{ inputs.new-version }}
steps:
- name: Merge rc${{ inputs.new-version }} into main
uses: everlytic/[email protected]
with:
github_token: ${{ secrets.PAT }}
source_ref: rc${{ inputs.new-version }}
target_branch: 'main'
commit_message_template: 'Merged rc${{ inputs.new-version }} into main. [skip ci]'

set-pre-release-as-lts:
needs: merge-rc-into-main
runs-on: ubuntu-latest

steps:
- name: Update v${{ inputs.new-version }} Tag Release from pre-release into latest
if: ${{ inputs.new-version && inputs.update-prerelease-into-latest == true }}
uses: softprops/[email protected]
with:
tag_name: v${{ inputs.new-version }}
prerelease: false
token: ${{ secrets.PAT }}

delete-rc-branch:
needs: merge-rc-into-main
runs-on: ubuntu-latest

if: ${{ inputs.delete-rc-branch == true }}
steps:
- name: Checkout branch dev
uses: actions/checkout@v4
with:
ref: dev

- name: Delete branch rc${{ inputs.new-version }}
shell: bash
run: |
git push origin -d rc${{ inputs.new-version }}
9 changes: 9 additions & 0 deletions .github/workflows/ValidatePRLabels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Validate pull request labels

on:
pull_request:
types: [opened, reopened, labeled, unlabeled]

jobs:
check-label:
uses: OutSystems/rd.github-reusable-workflows/.github/workflows/[email protected]
11 changes: 11 additions & 0 deletions .github/workflows/ValidatePRTitle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Validate pull request title

on:
pull_request:
types: [opened, reopened, edited]

jobs:
build:
uses: OutSystems/rd.github-reusable-workflows/.github/workflows/[email protected]
with:
validate-semVer: false
86 changes: 0 additions & 86 deletions .github/workflows/main-push.yml

This file was deleted.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# OutSystems Maps · [![GitHub license](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/OutSystems/outsystems-maps/blob/master/LICENSE) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
# OutSystems Maps · v1.8.0

![GitHub License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)


Add maps to your applications **OutSystems Reactive Web apps** with a single or multiple locations. Fully customizable and adaptable, allows you to change map behaviors, customize your map, add markers and customize each of them, according to your use case.

Expand Down
Loading

0 comments on commit 05e32e9

Please sign in to comment.