Skip to content

Add jira versioning #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 34 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
- master
- develop
- feature/*
- bugfix/*
pull_request:
branches: [ "develop" ]
branches:
- "*"
- master
- feature/**
- release/**

permissions:
contents: write
Expand All @@ -18,9 +21,11 @@ permissions:
env:
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
JIRA_USERNAME: ${{ secrets.JIRA_BOT_USERNAME }}
JIRA_PASSWORD: ${{ secrets.JIRA_BOT_PASSWORD }}

jobs:
build:
build_test_pack:
name: Build, test, and publish
runs-on: windows-latest
env:
Expand All @@ -33,13 +38,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: "npm"

- name: Setup dependencies
run: npm ci

Expand All @@ -56,4 +61,26 @@ jobs:

- name: Publish
if: ${{ github.ref == 'refs/heads/master' }}
run: npm run publish
run: npm run publish

jira-release:
if: ${{ contains(github.ref,'release/') }}
runs-on: windows-latest
name: Get release version & create JIRA release
needs: build_test_pack
steps:
- name: Checkout repository
uses: actions/checkout@v1

- name: Get release version
uses: episerver/addons-jira-automation/releaseversion@v1
id: branchVersion

- name: Create JIRA release
uses: episerver/addons-jira-automation/release@v1
with:
jira-project: AFORM
jira-package: OPTIMIZELY.FORMS.HEADLESS.JS.SDK
jira-host: jira.sso.episerver.net
version: ${{ steps.branchVersion.outputs.manifestSafeVersionString }}
versionSuffix: ${{needs.build_test_pack.outputs.versionSuffix}}
Loading