Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions .github/workflows/new_release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
name: New Release
on:
push:
branches:
- main
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
push:
# Only trigger on tag pushes
tags:
- 'data-*' # Push events to matching data-*, i.e. data-v1.0, data-v20.15.10

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
New UN data release, date data was fetched: $(date +'%Y-%m-%d')
draft: false
prerelease: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Extract tag name from the ref
TAG_NAME=${GITHUB_REF#refs/tags/}

# Get current date
CURRENT_DATE=$(date +'%Y-%m-%d')

# Create the release
gh release create "$TAG_NAME" \
--title "Release $TAG_NAME" \
--notes "New UN data release, date data was fetched: $CURRENT_DATE" \
--latest
9 changes: 4 additions & 5 deletions .github/workflows/new_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ on:

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version
uses: anothrNick/github-tag-action@1.70.0 # Use specific version instead of @v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
PRERELEASE: false
PRERELEASE: false
DEFAULT_BUMP: patch # Specify default bump type
Loading