Skip to content

Commit

Permalink
Fix draft latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-yurchenko committed Jan 17, 2024
1 parent 72e9da6 commit f943fa4
Show file tree
Hide file tree
Showing 172 changed files with 25,966 additions and 110 deletions.
8 changes: 0 additions & 8 deletions .bump

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Init
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: '1.21.5'

- name: Install Dependencies
run: go get -v -t -d ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Init
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: '1.21.5'

- name: Checkout
uses: actions/checkout@v4
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: version
on:
workflow_dispatch:
inputs:
version:
type: string
description: "Semantic Version (vX.X.X)"
required: true

jobs:
version:
name: Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Update version constant
env:
VERSION: ${{ github.event.inputs.version }}
run: |
sed -i "s/\(^[[:space:]]*Version[[:space:]]*string[[:space:]]*=[[:space:]]*\"\)[0-9]\+\(\.[0-9]\+\)\{2\}/\1${VERSION##v}/g" main.go
sed -i "s/LABEL org.opencontainers.image.version=\"[0-9].[0-9].[0-9]\"/LABEL org.opencontainers.image.version=\"${VERSION##v}\"/g" Dockerfile
sed -i "s/\(^[[:space:]]*\"version\": \"\)\([0-9]\+\(\.[0-9]\+\)\{2\}\)\(\",\)/\1${VERSION##v}\4/g" package.json
sed -i "0, /\(^[[:space:]]*\"version\": \"\)\([0-9]\+\(\.[0-9]\+\)\{2\}\)\(\",\)/s/\(^[[:space:]]*\"version\": \"\)\([0-9]\+\(\.[0-9]\+\)\{2\}\)\(\",\)/\1${VERSION##v}\4/g; 5, /\(^[[:space:]]*\"version\": \"\)\([0-9]\+\(\.[0-9]\+\)\{2\}\)\(\",\)/s/\(^[[:space:]]*\"version\": \"\)\([0-9]\+\(\.[0-9]\+\)\{2\}\)\(\",\)/\1${VERSION##v}\4/g" package-lock.json
- name: Create Version
uses: docker://antonyurchenko/changelog-version:v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
VERSION: ${{ github.event.inputs.version }}
UPDATE_TAGS: "true"
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.17.0
v20.11.0
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [Unreleased]

:warning: GitHub Actions initiate a deprecation process for [Node16](https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/)

### Fixed

- [Issue #122](https://github.com/anton-yurchenko/git-release/issues/122) Latest pre-release always recreated as Draft (*Thanks to [Taylor Becker](https://github.com/tajobe)*)

### Changed

- Update dependencies
- Update Golang version to v1.21.5
- **Breaking:** Update NodeJS version to v20.11.0

## [5.0.2] - 2023-04-09

### Fixed
Expand Down Expand Up @@ -374,6 +388,7 @@ This is a major release as most of the code was refactored and some behavior was
- Control Release Draft through env.var `DRAFT_RELEASE`
- Control Release Pre Release through env.var `PRE_RELEASE`

[Unreleased]: https://github.com/anton-yurchenko/git-release/compare/v5.0.2...HEAD
[5.0.2]: https://github.com/anton-yurchenko/git-release/compare/v5.0.1...v5.0.2
[5.0.1]: https://github.com/anton-yurchenko/git-release/compare/v5.0.0...v5.0.1
[5.0.0]: https://github.com/anton-yurchenko/git-release/compare/v4.2.4...v5.0.0
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21 as builder
FROM golang:1.21.5 as builder
WORKDIR /opt/src
COPY . .
RUN groupadd -g 1000 appuser &&\
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ inputs:
description: "Release Assets"
required: false
runs:
using: "node16"
using: "node20"
main: "wrapper.js"
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module git-release

go 1.21
go 1.21.5

require (
github.com/anton-yurchenko/go-changelog v1.1.0
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"git-release/release"
"time"

"github.com/pkg/errors"
"github.com/spf13/afero"
Expand Down Expand Up @@ -91,6 +92,7 @@ func main() {
if err := rel.UpdateUnreleasedTag(cli.Git); err != nil {
log.Fatal(errors.Wrapf(err, "error creating %v tag", rel.Reference.Tag))
}
time.Sleep(3 * time.Second)
}

log.Infof("creating %v release", rel.Name)
Expand Down
38 changes: 29 additions & 9 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions node_modules/@actions/core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions node_modules/@actions/core/lib/core.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 17 additions & 18 deletions node_modules/@actions/core/lib/core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f943fa4

Please sign in to comment.