-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #1
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
base: main
Are you sure you want to change the base?
Develop #1
Changes from all commits
a90355c
9dc9500
7172dbe
3f70ac4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: CD | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - v* | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| runs-on: ubuntu-slim | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: softprops/action-gh-release@v2 | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,37 @@ | ||||||||||
| name: CI | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| - push | ||||||||||
gabrielrufino marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
|
||||||||||
| permissions: | |
| contents: write |
gabrielrufino marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| # create-datetime-tag | ||
| # @actalog/create-datetime-tag | ||
|
|
||
| Creates and pushes a git tag based on the current date and time. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||||||||||||||||||||
| name: '@actalog/create-datetime-tag' | ||||||||||||||||||||||||
| author: Gabriel Rufino <contato@gabrielrufino.com> | ||||||||||||||||||||||||
| description: 'Creates and pushes a git tag based on the current date and time.' | ||||||||||||||||||||||||
| branding: | ||||||||||||||||||||||||
| icon: tag | ||||||||||||||||||||||||
| color: orange | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| outputs: | ||||||||||||||||||||||||
| tag: | ||||||||||||||||||||||||
| description: 'The created tag name' | ||||||||||||||||||||||||
| value: ${{ steps.create-tag.outputs.tag }} | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| runs: | ||||||||||||||||||||||||
| using: composite | ||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||
| - id: create-tag | ||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||
| TAG=$(date +%Y-%m-%d.%H-%M) | ||||||||||||||||||||||||
gabrielrufino marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| echo "tag=$TAG" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||
| echo "Creating tag: $TAG" | ||||||||||||||||||||||||
| git config user.name "github-actions[bot]" | ||||||||||||||||||||||||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||||||||||||||||||||||||
| git tag -a "$TAG" -m "Auto-generated tag for $TAG" | ||||||||||||||||||||||||
| git push origin "$TAG" | ||||||||||||||||||||||||
|
Comment on lines
+25
to
+26
|
||||||||||||||||||||||||
| echo "Tag $TAG created and pushed successfully!" | ||||||||||||||||||||||||
|
Comment on lines
+25
to
+27
|
||||||||||||||||||||||||
| git tag -a "$TAG" -m "Auto-generated tag for $TAG" | |
| git push origin "$TAG" | |
| echo "Tag $TAG created and pushed successfully!" | |
| if git rev-parse --verify --quiet "refs/tags/$TAG" >/dev/null; then | |
| echo "Tag $TAG already exists. Skipping creation and push." | |
| else | |
| git tag -a "$TAG" -m "Auto-generated tag for $TAG" | |
| git push origin "$TAG" | |
| echo "Tag $TAG created and pushed successfully!" | |
| fi |
Uh oh!
There was an error while loading. Please reload this page.