Skip to content

Commit a902083

Browse files
committed
[chore]recreate job for deployment
1 parent 8fa19a9 commit a902083

1 file changed

Lines changed: 42 additions & 23 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ name: Deploy to AWS Maven Repository
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- 'CASHEW_NUTS-748/deploy-github-actions'
5+
inputs:
6+
version:
7+
description: 'Version to deploy (e.g., 0.64.9, will be prefixed with nu-)'
8+
required: true
9+
type: string
810

911
permissions:
1012
id-token: write
11-
contents: read
13+
contents: write
1214

1315
jobs:
1416
deploy:
@@ -17,22 +19,39 @@ jobs:
1719
- name: Checkout code
1820
uses: actions/checkout@v4
1921

20-
# - name: Set up JDK
21-
# uses: actions/setup-java@v4
22-
# with:
23-
# java-version: '21'
24-
# distribution: 'temurin'
25-
# cache: 'maven'
26-
27-
# - name: Configure AWS Credentials
28-
# uses: aws-actions/configure-aws-credentials@main
29-
# with:
30-
# role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
31-
# aws-region: ${{ secrets.AWS_REGION }}
32-
33-
# - name: Deploy flexmark-all to AWS Maven Repository
34-
# env:
35-
# MAVEN_REPOSITORY_ID: ${{ secrets.MAVEN_REPOSITORY_ID }}
36-
# MAVEN_REPOSITORY_URL: ${{ secrets.MAVEN_REPOSITORY_URL }}
37-
# run: |
38-
# mvn deploy -pl flexmark-all -am -DskipTests=true
22+
- name: Set up JDK
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: '21'
26+
distribution: 'temurin'
27+
cache: 'maven'
28+
29+
- name: Update version in pom.xml
30+
run: |
31+
mvn versions:set -DnewVersion=nu-${{ inputs.version }} -DgenerateBackupPoms=false
32+
33+
- name: Commit and push version changes
34+
run: |
35+
git config user.name "github-actions[bot]"
36+
git config user.email "github-actions[bot]@users.noreply.github.com"
37+
git add -A
38+
git commit -m "chore: bump version to nu-${{ inputs.version }}"
39+
git push
40+
41+
- name: Create and push tag
42+
run: |
43+
git tag -a "v${{ inputs.version }}" -m "Release version nu-${{ inputs.version }}"
44+
git push origin "v${{ inputs.version }}"
45+
46+
- name: Configure AWS Credentials
47+
uses: aws-actions/configure-aws-credentials@main
48+
with:
49+
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
50+
aws-region: ${{ secrets.AWS_REGION }}
51+
52+
- name: Deploy flexmark-all to AWS Maven Repository
53+
env:
54+
MAVEN_REPOSITORY_ID: ${{ secrets.MAVEN_REPOSITORY_ID }}
55+
MAVEN_REPOSITORY_URL: ${{ secrets.MAVEN_REPOSITORY_URL }}
56+
run: |
57+
mvn deploy -pl flexmark-all -am -DskipTests=true

0 commit comments

Comments
 (0)