This repository has been archived by the owner on May 31, 2024. It is now read-only.
maven: bump the minor group across 1 directory with 16 updates #99
Workflow file for this run
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
name: Release | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
Deploy: | |
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') | |
runs-on: ubuntu-latest | |
environment: Production | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: SetVars | |
run: | | |
sed -i 's/${AWS::AccountId}/${{ secrets.AWS_ACCOUNT_ID }}/' infra/role/template.yml | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '20' | |
distribution: 'zulu' | |
- name: Install xmlstarlet | |
run: sudo apt-get update && sudo apt-get install -y xmlstarlet | |
- name: AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubDeployBase | |
role-session-name: ${{ vars.SESSION_NAME }} | |
aws-region: ${{ vars.AWS_REGION }} | |
- name: Prepare Zip | |
run: | | |
mvn clean package | |
mkdir -p target/java/lib | |
cp target/core-iceberg-utils-*.jar target/java/lib/ | |
cd target && zip -r core-iceberg-utils.zip java | |
- name: SAM Deploy Role | |
run: cd infra/role && sam build && sam package && sam deploy | |
- name: AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubDeployCoreOceanIcebergUtils | |
role-session-name: ${{ env.SESSION_NAME }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: SAM Deploy Layer | |
run: cd infra/layer && sam build && sam deploy | |
- name: Get Version | |
id: version | |
run: echo "current=$(xmlstarlet sel -t -m _:project -v _:version pom.xml)" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.version.outputs.current }} |