Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
mazaheriMahdi committed Nov 22, 2024
1 parent ba89353 commit ef0fada
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/realese.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Create Release from Tag

on:
push:
tags:
- 'v*.*.*' # Matches tags like v1.1.1, v2.0.0, etc.

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Create a release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }} # Use the current tag
release_name: Release ${{ github.ref_name }}
body: |
Automatically generated release for tag ${{ github.ref_name }}.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v4
- name: tag
id: tag
uses: mazaheriMahdi/auto-tagger-action@v0.0.2
uses: mazaheriMahdi/auto-tagger-action@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use the output from the `hello` step
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const core = require('@actions/core');

core.setOutput("tag", newTag)
console.log(`Tag ${newTag} created and pushed.`);

execSync(`git tag latest`);
execSync(`git push origin latest`);
console.log("latest tag puhed")
} catch (error) {
console.error("Error incrementing version:", error.message);
process.exit(1);
Expand Down

0 comments on commit ef0fada

Please sign in to comment.