Skip to content

Commit

Permalink
Identification of missing cmd tool
Browse files Browse the repository at this point in the history
  • Loading branch information
JUAN CASTAÑEDA committed Sep 1, 2023
1 parent 73ab7e8 commit 8f5064a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
branches: [ main ]

jobs:

test:
name: Test
runs-on: ubuntu-latest
Expand All @@ -30,8 +29,8 @@ jobs:
- name: Run tests
run: ./gradlew build && ./gradlew check

release_and_publish:
name: Release and Publish
release:
name: Release version
runs-on: ubuntu-latest
needs:
- test
Expand All @@ -45,19 +44,37 @@ jobs:
distribution: 'corretto'
java-version: '11'
cache: 'gradle'

- name: Build Project
run: ./gradlew build

- name: Create Release
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
id: create_release
uses: zendesk/action-create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
auto_increment_type: major

publish:
name: Publish version
runs-on: ubuntu-latest
needs:
- release
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-tags: true
fetch-depth: 0

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'
cache: 'gradle'

- name: Publish Package
# if: github.ref == 'refs/heads/main'
env:
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ target_data_directory := lib/src/main/resources/
target_po_directory := lib/src/main/resources/iso_3166/
target_po_639_directory := lib/src/main/resources/iso_639/

GIT_VERSION=$(shell git --version)
ARTIFACT_VERSION=$(shell git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 2-7)
ARTIFACT_VERSION_1=$(shell git tag --sort=committerdate | grep -E '[0-9]' | tail -1)
ARTIFACT_VERSION_2=$(shell git tag --sort=committerdate | grep -E '[0-9]')
ARTIFACT_VERSION_3=$(shell git tag --sort=committerdate)
ARTIFACT_VERSION_4=$(shell git tag)

.PHONY: clone-iso-codes
clone-iso-codes:
Expand Down Expand Up @@ -33,6 +38,7 @@ get-latest-iso-files: clone-iso-codes transpile-translations delete-po-and-mo

.PHONY: publish
publish:
@echo "[make]Publishing version $(ARTIFACT_VERSION)"
@echo "[make] GIT version $(GIT_VERSION)"
@echo "[make] Publishing version $(ARTIFACT_VERSION)"
ARTIFACT_VERSION=$(ARTIFACT_VERSION) ./gradlew testVersion
ARTIFACT_VERSION=$(ARTIFACT_VERSION) ./gradlew publish
ARTIFACT_VERSION=$(ARTIFACT_VERSION) ./gradlew publish

0 comments on commit 8f5064a

Please sign in to comment.