Skip to content
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

tag submodules #90

Merged
merged 2 commits into from
Feb 4, 2024
Merged
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
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: write

jobs:
release:
name: From changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest release info
id: query-release-info
uses: release-flow/keep-a-changelog-action@v2
with:
command: query
version: latest
- name: Get latest release
id: latest-release
uses: actions/github-script@v7
continue-on-error: true
with:
script: |
return await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: "v${{ steps.query-release-info.outputs.version }}"
})
- name: Create release
uses: actions/github-script@v7
if: steps.latest-release.outcome != 'success'
with:
script: |
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: "v${{ steps.query-release-info.outputs.version }}",
target_commitish: context.sha
name: "v${{ steps.query-release-info.outputs.version }}"
body: "${{ steps.query-release-info.outputs.release-notes }}"
})
27 changes: 27 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tag
on:
release:
types: [published]

permissions:
contents: write

jobs:
tag:
strategy:
matrix:
module: [ 'provider/file', 'provider/pflag' ]
name: Submodules
runs-on: ubuntu-latest
steps:
- name: Create tag
uses: actions/github-script@v7
with:
script: |
ref = "refs/tags/${{ matrix.module }}/" + context.ref.split('/')[2]
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: ref,
sha: context.sha
})
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -16,18 +16,18 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

- Switch from mitchellh/mapstructure to go-viper/mapstructure (#69).

## [v0.3.0] - 11/17/2023
## [0.3.0] - 2023-11-17

### Changed

- [BREAKING] Redesign API.

## [v0.2.0] - 3/18/2023
## [0.2.0] - 2023-03-18

### Removed

- Remove file.WithLog to favor standard log.Printf (#32).

## [v0.1.0] - 3/12/2023
## [0.1.0] - 2023-03-12

Initial alpha release.