-
Notifications
You must be signed in to change notification settings - Fork 92
Bump Go v1.24.4 to fix CVEs #69
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
Changes from all commits
85984d6
06b9a16
53c5ada
2132e2e
5b48be9
127caa2
79b0551
9c2cdb6
3c7a15a
088b24e
0264dd1
ae2a2e7
a0507bc
e154c18
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 |
|---|---|---|
|
|
@@ -2,7 +2,16 @@ name: Release Binaries | |
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
| types: | ||
| - created | ||
| - published | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag_name: | ||
| description: 'Release tag name (e.g., v1.4.5). Can ignore this if selecting workflow run from a release tag.' | ||
| required: false | ||
| type: string | ||
| default: '' | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
@@ -14,6 +23,8 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| ref: ${{ inputs.tag_name || github.ref_name }} | ||
| - uses: wangyoucao577/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -22,11 +33,14 @@ jobs: | |
| project_path: cmd/envsubst | ||
| asset_name: envsubst-Linux-x86_64 | ||
| compress_assets: OFF | ||
| release_name: ${{ inputs.tag_name || '' }} | ||
| release-linux-arm64: | ||
| name: release linux/arm64 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
||
| with: | ||
| ref: ${{ inputs.tag_name || github.ref_name }} | ||
| - uses: wangyoucao577/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -35,11 +49,14 @@ jobs: | |
| project_path: cmd/envsubst | ||
| asset_name: envsubst-Linux-arm64 | ||
| compress_assets: OFF | ||
| release_name: ${{ inputs.tag_name || '' }} | ||
| release-darwin-amd64: | ||
| name: release darwin/amd64 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
||
| with: | ||
| ref: ${{ inputs.tag_name || github.ref_name }} | ||
| - uses: wangyoucao577/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -48,11 +65,14 @@ jobs: | |
| project_path: cmd/envsubst | ||
| asset_name: envsubst-Darwin-x86_64 | ||
| compress_assets: OFF | ||
| release_name: ${{ inputs.tag_name || '' }} | ||
| release-darwin-arm64: | ||
| name: release darwin/arm64 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
||
| with: | ||
| ref: ${{ inputs.tag_name || github.ref_name }} | ||
| - uses: wangyoucao577/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -61,11 +81,14 @@ jobs: | |
| project_path: cmd/envsubst | ||
| asset_name: envsubst-Darwin-arm64 | ||
| compress_assets: OFF | ||
| release_name: ${{ inputs.tag_name || '' }} | ||
| release-windows: | ||
| name: release windows | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
||
| with: | ||
| ref: ${{ inputs.tag_name || github.ref_name }} | ||
| - uses: wangyoucao577/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -75,3 +98,4 @@ jobs: | |
| binary_name: envsubst-windows #release fails if the binary name is the same as the asset name | ||
| asset_name: envsubst | ||
| compress_assets: OFF | ||
| release_name: ${{ inputs.tag_name || '' }} | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,60 @@ | ||||||||||||||||||||||||||||||||||||||
| name: Create Release | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||
| tag_name: | ||||||||||||||||||||||||||||||||||||||
| description: 'Release tag name (e.g., v1.4.5)' | ||||||||||||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||
| release_title: | ||||||||||||||||||||||||||||||||||||||
| description: 'Release title (optional)' | ||||||||||||||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||
| default: '' | ||||||||||||||||||||||||||||||||||||||
| release_body: | ||||||||||||||||||||||||||||||||||||||
| description: 'Release description (optional)' | ||||||||||||||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||
| default: '' | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||
| packages: write | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| packages: write |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actions/create-release@v1 action is deprecated and unmaintained. GitHub recommends using the GitHub CLI (gh release create) or the REST API instead. Consider replacing this with:
- name: Create Release
run: |
gh release create "${{ inputs.tag_name }}" \
--title "${{ inputs.release_title || inputs.tag_name }}" \
--notes "${{ inputs.release_body }}" \
${draft:+--draft} \
${prerelease:+--prerelease}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ inputs.tag_name }} | |
| release_name: ${{ inputs.release_title || inputs.tag_name }} | |
| body: ${{ inputs.release_body }} | |
| draft: false | |
| prerelease: false | |
| run: | | |
| gh release create "${{ inputs.tag_name }}" \ | |
| --title "${{ inputs.release_title || inputs.tag_name }}" \ | |
| --notes "${{ inputs.release_body }}" \ | |
| --draft=false \ | |
| --prerelease=false | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -94,6 +94,70 @@ func main() { | |||||
|
|
||||||
| * `os.ExpandEnv(s string) string` - only supports `$var` and `${var}` notations | ||||||
|
|
||||||
| #### Creating Releases | ||||||
|
|
||||||
| This project uses automated workflows to create releases with prebuilt binaries for multiple platforms. | ||||||
|
|
||||||
| ##### Release Workflows | ||||||
|
|
||||||
| **`create-release.yml`**: Creates git tags and GitHub releases | ||||||
| - **Trigger**: Manual via GitHub Actions UI | ||||||
| - **Inputs**: Tag name, optional release title and description | ||||||
| - **Features**: | ||||||
| - Creates git tag (skips if already exists) | ||||||
| - Creates GitHub release | ||||||
| - Handles existing tags gracefully (rerunnable) | ||||||
|
|
||||||
| **`binaries.yml`**: Builds and uploads binaries | ||||||
| - **Triggers**: | ||||||
| - Automatically on release creation | ||||||
| - Manual dispatch with optional tag name | ||||||
| - **Platforms**: Linux (amd64, arm64), macOS (amd64, arm64), Windows (amd64) | ||||||
| - **Features**: Builds from specific tag or latest release | ||||||
|
|
||||||
| ##### Release Procedure | ||||||
|
|
||||||
| 1. Go to the **Actions** tab in the GitHub repository | ||||||
| 2. Select the **"Create Release"** workflow | ||||||
| 3. Click **"Run workflow"** | ||||||
| 4. Enter the tag name following semantic versioning (e.g., `v1.4.5`) | ||||||
| 5. Optionally provide a release title and description | ||||||
| 6. Click **"Run workflow"** | ||||||
| 7. Wait for the workflow to complete successfully | ||||||
| 8. Go back to the **Actions** tab and select the **"Release Binaries"** workflow | ||||||
| 9. Click **"Run workflow"** to build and upload binaries for the new release | ||||||
| 10. Enter the same tag name in step (4) (or select `Use workflow from` released tag) | ||||||
| 11. Click **"Run workflow"** | ||||||
|
|
||||||
| ##### What Happens During Release | ||||||
|
|
||||||
| 1. **Tag Creation**: Creates a git tag with the specified version | ||||||
| 2. **Release Creation**: Creates a GitHub release with optional title/description | ||||||
| 3. **Binary Building**: Automatically triggers binary builds for all platforms: | ||||||
|
||||||
| 3. **Binary Building**: Automatically triggers binary builds for all platforms: | |
| 3. **Binary Building**: Automatically triggers when a release is created, or can be manually triggered to build binaries for all platforms: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| module github.com/a8m/envsubst | ||
|
|
||
| go 1.24 | ||
| go 1.25.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
actions/checkout@v2is outdated. Consider upgrading toactions/checkout@v4for better performance, security updates, and Node.js 20 support (v2 uses the deprecated Node.js 12). This applies to all checkout actions in this file.