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
7 changes: 5 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ jobs:

- name: Build package and upload from docker (Linux)
if: runner.os == 'Linux'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
docker run --rm -v "${PWD}:/opt/OpenCC" \
-e TWINE_USERNAME=__token__ \
-e TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} \
-e TWINE_USERNAME \
-e TWINE_PASSWORD \
-e VERSION=${VERSION} \
ubuntu:22.04 /bin/bash /opt/OpenCC/release-pypi-linux.sh testonly

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ jobs:

- name: Build package and upload from docker (Linux)
if: runner.os == 'Linux'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
docker run --rm -v "${PWD}:/opt/OpenCC" \
-e TWINE_USERNAME=__token__ \
-e TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} \
-e TWINE_USERNAME \
-e TWINE_PASSWORD \
-e VERSION=${VERSION} \
ubuntu:22.04 /bin/bash /opt/OpenCC/release-pypi-linux.sh

Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/release-winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ jobs:
- name: Resolve version
id: version
shell: pwsh
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
GIT_REF_TYPE: ${{ github.ref_type }}
GIT_REF_NAME: ${{ github.ref_name }}
run: |
$value = "${{ github.event.inputs.version }}"
if (-not $value -and "${{ github.ref_type }}" -eq "tag") {
$value = "${{ github.ref_name }}"
$value = $env:INPUT_VERSION
if (-not $value -and $env:GIT_REF_TYPE -eq "tag") {
$value = $env:GIT_REF_NAME
}
if ($value.StartsWith("ver.")) {
$clean = $value.Substring(4)
Expand All @@ -47,11 +51,14 @@ jobs:

- name: Build portable release and WinGet manifests
shell: pwsh
env:
RELEASE_VERSION: ${{ steps.version.outputs.value }}
GITHUB_REPO: ${{ github.repository }}
run: |
./scripts/release-windows-winget.ps1 `
-Version "${{ steps.version.outputs.value }}" `
-Version "$env:RELEASE_VERSION" `
-OutputDir release `
-GitHubRepository "${{ github.repository }}" `
-GitHubRepository "$env:GITHUB_REPO" `
-PackageIdentifier "BYVoid.OpenCC" `
-Publisher "BYVoid"

Expand Down
Loading