diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf909cb..b33b5b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,23 +3,22 @@ name: Build and Release on: push: tags: - - 'v*' # Trigger this workflow for tags like v0.1.0, v0.1.1, etc. + - 'v*' jobs: build: runs-on: ubuntu-latest permissions: - contents: write # Required to create a release - issues: read # Optional, if you need to read issues - + contents: write + issues: read steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: '1.19' # Set your Go version + go-version: '1.19' - name: Determine Version id: determine_version @@ -37,7 +36,8 @@ jobs: id: get_previous_tag run: | if [[ "${GITHUB_REF}" == refs/tags/* ]]; then - PREVIOUS_TAG=$(git tag --sort=-creatordate | awk -v current="${{ env.VERSION }}" '$0 == current {getline; print; exit}') + CURRENT_TAG="${{ env.VERSION }}" + PREVIOUS_TAG=$(git tag --sort=-creatordate | awk -v current="${CURRENT_TAG}" '$0 == current {getline; print; exit}') echo "PREVIOUS_TAG=${PREVIOUS_TAG}" >> $GITHUB_ENV fi @@ -58,9 +58,9 @@ jobs: - name: Create Release if: startsWith(github.ref, 'refs/tags/') # Only create a release if it's a tag - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: - tag_name: ${{ env.VERSION }} # Use the tag extracted earlier + tag_name: ${{ env.VERSION }} name: Release ${{ env.VERSION }} body: | **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ env.PREVIOUS_TAG }}...${{ env.VERSION }} diff --git a/pkg/dockermi.go b/pkg/dockermi.go index 467cd1c..71e4f6c 100644 --- a/pkg/dockermi.go +++ b/pkg/dockermi.go @@ -16,7 +16,7 @@ import ( "github.com/fatih/color" ) -const version = "0.1.2" +const version = "0.1.3" // RunDockermi executes the main logic of the dockermi command. It takes a // projectDir parameter, which specifies the directory where the function